A152302 a(n) = f(n) mod 10 where f(n) = f(n-1) + f(n-2) + floor(f(n-1)/10) starting f(0) = f(1) = 1.
1, 1, 1, 1, 2, 3, 5, 8, 3, 2, 7, 2, 5, 7, 9, 5, 4, 4, 2, 0, 5, 3, 9, 9, 6, 9, 9, 3, 7, 5, 8, 2, 0, 1, 5, 8, 3, 0, 0, 9, 0, 8, 1, 3, 4, 5, 4, 3, 4, 8, 8, 9, 8, 3, 4, 0, 2, 3, 9, 5, 1, 6, 5, 4, 6, 9, 6, 4, 2, 7, 4, 8, 2, 8, 7, 5, 5, 6, 8, 9, 2, 4, 3, 7, 3, 6, 1, 2, 9, 2, 0, 6, 0, 5, 5, 8, 5, 9, 0, 1, 9
Offset: 0
Keywords
References
- Ivars Peterson, The Jungles of Randomness, John Wiley and Sons, Inc., 1998, page 207.
Programs
-
Mathematica
f[0] = f[1] = 1; f[x_] := f[x] = f[x - 1] + f[x - 2] + Floor[f[x - 1]/10]; Table[Mod[f[n], 10], {n, 0, 100}]
Extensions
Data corrected to match formula by Kevin Ryde, Jul 08 2025