login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A133880
n modulo p repeated p times (where p=10).
50
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1
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
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Oct 10 2007
STATUS
approved