login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A235499
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(3).
9
0, 1, 2, 3, 9, 10, 11, 12, 13, 19, 20, 21, 22, 23, 29, 30, 31, 32, 33, 39, 40, 41, 42, 43, 49, 50, 51, 52, 53, 59, 60, 61, 62, 63, 69, 70, 71, 72, 73, 79, 80, 81, 82, 83, 89, 90, 91, 92, 93, 99, 100, 101, 102, 103, 109, 110, 111, 112, 113, 119, 120, 121, 122, 123, 129
OFFSET
0,3
FORMULA
G.f.: (x^5+6*x^4+x^3+x^2+x)/(x^6-x^5-x+1). - Alois P. Heinz, Feb 07 2014
MATHEMATICA
CoefficientList[Series[(x^5 + 6 x^4 + x^3 + x^2 + x)/(x^6 - x^5 - x + 1), {x, 0, 50}], x] (* Vincenzo Librandi, Feb 08 2014 *)
nxt[n_]:=If[Mod[n, 10]==3, FromDigits[Join[Most[IntegerDigits[n]], {9}]], n+ 1]; NestList[nxt, 0, 70] (* or *) LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 9, 10}, 70] (* Harvey P. Dale, Oct 02 2016 *)
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Feb 06 2014
EXTENSIONS
Definition by N. J. A. Sloane, Feb 07 2014
STATUS
approved