OFFSET
0,3
COMMENTS
The first differences 0, 1, 3, 6, 0, 5, 1, 8, 6, 5, 5, 6, 8, 1, 5, 0, 6, 3, 1, 0, etc. are in A008954.
REFERENCES
Giorgio Balzarotti and Paolo P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 62.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
J. Bokowski & N. J. A. Sloane, Emails, June 1994.
FORMULA
a(n+1) = a(n) + (a(n) - a(n-1) + (n+1) mod 10) mod 10, with a(0)=0, a(1)=1.
G.f.: x*(x^12+3*x^11+6*x^10+5*x^8+5*x^6+5*x^4+6*x^2+3*x+1) / (x^16 -x^15 -x^11 +x^10 +x^6 -x^5 -x +1). - Alois P. Heinz, Jan 23 2021
EXAMPLE
a(9) = 35 because a(8) - a(7) + (9 mod 10) = 30 - 24 + 9 = 15 and a(8) + (15 mod 10) = 30 + 5 = 35.
Jumping we move to the numbers 0, 1, 3, 6, 0, 5, 1, 8, 6, 5, 5, 6, 8, 1, 5, 0, 6, 3, 1, 0, 0, 1, 3, 6, 0, 5, 1, 8, 6, etc. Summing the numbers we obtain 0, 0+1 = 1, 1+3 = 4, 4+6 = 10, 10+0 = 10, 10+5 = 16, etc.
MAPLE
a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
[0, 1, 3, 6, 0, 5, 1, 8, 6, 5, 5, 6, 8, 1, 5, 0, 6, 3, 1, 0, 0]
[1+irem(n, 20)])
end:
seq(a(n), n=0..60); # Alois P. Heinz, Jan 23 2021
MATHEMATICA
Fold[Append[#1, #1[[-1]] + Mod[(#1[[-1]] - #1[[-2]] + Mod[#2, 10]), 10]] &, {0, 1}, Range[2, 58]] (* Michael De Vlieger, Nov 05 2017 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Giorgio Balzarotti and Paolo P. Lava, Oct 10 2005
STATUS
approved