In the random walk whose state space is a subset of the non-negative i
ntegers explicit representations for the generating functions of the n
-step transition and the first return probabilities are obtained. Thes
e representations involve the Stieltjes transform of the spectral meas
ure of the process and the corresponding orthogonal polynomials. Sever
al examples are given in order to illustrate the application of the re
sults.