A237341 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(4).
0, 1, 2, 3, 4, 16, 17, 18, 19, 20, 21, 22, 23, 24, 216, 217, 218, 219, 220, 221, 222, 223, 224, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 22216, 22217, 22218, 22219, 22220, 22221, 22222, 22223, 22224, 222216, 222217, 222218, 222219, 222220, 222221
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, -10).
Formula
G.f.: (10*x^17 +20*x^16 +30*x^15 +40*x^14 -20*x^13 -10*x^12 +10*x^10 +20*x^9 +19*x^8 +18*x^7 +17*x^6 +16*x^5 +4*x^4 +3*x^3 +2*x^2 +x)/(10*x^18 -11*x^9 +1). - Alois P. Heinz, Feb 07 2014
Extensions
Definition by N. J. A. Sloane, Feb 07 2014