Consider the R-vector space R[X] of all polynomials with real coefficients and define an R-linear functional L:R[X]→R by LXn=an, n=0,1,2,…. Thus, if f=∑kαkXk, then Lf=∑kαkak. Since (X+1)n=∑k=0n(kn)Xk, n≥1,
L(X+1)n=k=0∑n(kn)LXk=k=0∑n(kn)ak=k=0∑n−1(kn)ak+an=2an=2LXn,
so Lf(X+1)=2Lf(X)−f(0) for every polynomial f in R[X]. In particular, take f=(kX) and use the relation (kX+1)=(kX)+(k−1X), k≥1, to get L(kX)=L(k−1X), k≥1, and deduce that L(kX)=1, k=0,1,2,…. Further, if a polynomial f in R[X] is integral valued, i.e., f(k) is integral for every integral k, then f=∑kαk(kX) for some integers αk, so Lf=∑kαk is an integer. Finally, since apm≡apm−1(modpm) for all integers a,
f=p−m(Xpmq+r−Xpm−1q+r)
is an integral valued polynomial in R[X], so Lf=(apmq+r−apm−1q+r)/pm is an integer, as required.