OFFSET
1,1
COMMENTS
It appears that this sequence and A121805 have no terms in common. Furthermore, this sequence exists for at least 1551000000 terms. - Jacques ALARDET, Jul 22 2008
The last term of the sequence is a(194697747222394) = 9999999999999918. - Giovanni Resta, Nov 30 2019
REFERENCES
E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Carlos Rivera, Puzzle 980. The "Commas" sequence, The Prime Puzzles and Problems Connection.
MAPLE
a:= proc(n) option remember; local k, t, y; if n=1 then 2 else k:= a(n-1); for y from 0 to 9 do t:= k +10* irem (k, 10) +y; if convert (t, base, 10)[ -1]=y then return t fi od; NULL fi end: seq(a(n), n=1..80); # Alois P. Heinz, Aug 13 2009
MATHEMATICA
a[1] = 2; a[n_] := a[n] = For[x=Mod[a[n-1], 10]; y=0, y <= 9, y++, an = a[n-1] + 10*x + y; If[y == IntegerDigits[an][[1]], Return[an]]]; Array[a, 80] (* Jean-François Alcover, Nov 25 2014 *)
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
an, y = 2, 1
while y < 10:
yield an
an, y = an + 10*(an%10), 1
while y < 10:
if str(an+y)[0] == str(y):
an += y
break
y += 1
print(list(islice(agen(), 47))) # Michael S. Branicky, Apr 08 2022
CROSSREFS
KEYWORD
nonn,base,fini
AUTHOR
N. J. A. Sloane (based on Angelini's article), Jun 08 2008
EXTENSIONS
More terms from Alois P. Heinz, Aug 13 2009
STATUS
approved