A237343 For k in {2,3,...,9} define a sequence as follows: a(0)=0; for n>=0, a(n+1)=a(n)+1, unless a(n) ends in k, in which case a(n+1) is obtained by replacing the last digit of a(n) with the digit(s) of k^2. This is k(6).
0, 1, 2, 3, 4, 5, 6, 36, 336, 3336, 33336, 333336, 3333336, 33333336, 333333336, 3333333336, 33333333336, 333333333336, 3333333333336, 33333333333336, 333333333333336, 3333333333333336, 33333333333333336, 333333333333333336, 3333333333333333336
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (11, -10).
Programs
-
Mathematica
Join[Range[0, 5], Table[(8 + 10^(n - 5))/3, {n, 6, 30}]] (* Bruno Berselli, Feb 08 2014 *)
Formula
G.f.: (20*x^7-9*x^6-9*x^5-9*x^4-9*x^3-9*x^2+x)/(10*x^2-11*x+1). - Alois P. Heinz, Feb 07 2014
a(n) = ( 8 + 10^(n-5) )/3 for n>5. [Bruno Berselli, Feb 08 2014]
Extensions
Definition by N. J. A. Sloane, Feb 07 2014