OFFSET
0,11
COMMENTS
Periodic with length p^2=100.
a(n) = A179051(n) for n < 90. - Reinhard Zumkeller, Jun 27 2010
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1).
FORMULA
The following formulas are given for a general parameter p (p=10 for this sequence).
a(n)=(1+floor(n/p)) mod p.
a(n)=1+floor(n/p)-p*floor((n+p)/p^2).
a(n)=(((n+p) mod p^2)-(n mod p))/p.
a(n)=((n+p-(n mod p))/p) mod p.
G.f. g(x)=((p-1)x^(p^2)-px^(p(p-1))+1)/((1-x)(1-x^p)(1-x^(p^2))).
G.f. g(x)=(1-x^p)*sum{0<=k<(p-1), (k+1)*x^(k*p)}/((1-x)(1-x^(p^2))).
MATHEMATICA
Flatten[Table[PadRight[{}, 10, Mod[n, 10]], {n, 11}]] (* Harvey P. Dale, May 10 2012 *)
PROG
(PARI) a(n)=(n\10+1)%10 \\ Charles R Greathouse IV, Nov 15 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Oct 10 2007
STATUS
approved