A061352 First row of array shown below.
1, 2, 6, 7, 5, 6, 8, 9, 5, 6, 6, 7, 1, 2, 0, 1, 3, 4, 0, 1, 1, 2, 6, 7, 5, 6, 8, 9, 5, 6, 6, 7, 1, 2, 0, 1, 3, 4, 0, 1, 1, 2, 6, 7, 5, 6, 8, 9, 5, 6, 6, 7, 1, 2, 0, 1, 3, 4, 0, 1, 1, 2, 6, 7, 5, 6, 8, 9, 5, 6, 6, 7, 1, 2, 0, 1, 3, 4, 0, 1, 1, 2, 6, 7, 5, 6, 8, 9, 5, 6, 6, 7, 1, 2, 0, 1, 3, 4, 0, 1, 1, 2, 6, 7, 5
Offset: 1
Examples
1 2 6 7 5 6 8 9 5 ... 3 5 8 4 7 7 0 4 ... 4 9 3 8 6 1 3 ... 0 2 9 5 2 2 ... 1 0 4 3 1 ... 1 3 4 0 ...
Crossrefs
Cf. A061353.
Formula
a(1)=1; if n odd, a(n+1)=(a(n)+1) mod 10; if n even, a(n+1)=(a(n)+2n) mod 10.
a(2n-1) = n*(2n-1)- 10*Floor[n*(2n-1)/10], a(2n) = n(2n+1)- 10*Floor[n*(2n+1)/10] + 1.
Extensions
More terms and formula from Larry Reeves (larryr(AT)acm.org), May 15 2001
Comments