A010889 Simple periodic sequence: repeat 1,2,3,4,5,6,7,8,9,10.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
Crossrefs
Programs
-
Mathematica
PadRight[{},120,Range[10]] (* Harvey P. Dale, Feb 22 2015 *)
-
Python
def a(n): return n % 10 + 1 # Paul Muljadi, Aug 06 2024
Formula
a(n) = 1 + (n mod 10) - Paolo P. Lava, Nov 21 2006
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010879(n)+1.
G.f.: (Sum_{k=0..9} (k+1)*x^k)/(1-x^10).
G.f.: (10x^11-11x^10+1)/((1-x^10)(1-x)^2). (End)
Extensions
More terms from Klaus Brockhaus, May 15 2010
Comments