A061501 a(1) = 1, a(n+1) = (a(n) + n) mod 10.
1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1
Offset: 1
Examples
1 2 4 7 1 6 2 9 7 6 6 ... 3 5 8 2 7 3 0 8 7 7 ... 6 9 3 8 4 1 9 8 8 ... 0 4 9 5 2 0 9 9 ... 5 0 6 3 1 0 0 ... 1 7 4 2 1 1 ...
Programs
-
Mathematica
a = {1}; Do[AppendTo[a, Mod[a[[n - 1]] + n - 1, 10]], {n, 2, 120}]; a (* Michael De Vlieger, Feb 13 2017 *)
-
PARI
a(n)=if(n==1,return(1));(a(n-1)+n-1)%10 for(n=1,50,print1(a(n),", ")) \\ Derek Orr, Feb 26 2017
Formula
a(n) = A008954(n-1) + 1.
a(n) = A000124(n) mod 10. - Peter M. Chema, Feb 11 2017
From Chai Wah Wu, Jan 09 2020: (Start)
a(n) = a(n-5) - a(n-10) + a(n-15) for n > 15.
G.f.: x*(-x^14 - 2*x^13 - 4*x^12 - 7*x^11 - x^10 - 5*x^9 - 5*x^7 - 5*x^5 - x^4 - 7*x^3 - 4*x^2 - 2*x - 1)/(x^15 - x^10 + x^5 - 1). (End)
Extensions
Better description and more terms from Larry Reeves (larryr(AT)acm.org), May 08 2001
Comments