A139284 Analog of A121805, but starting with 2.
2, 24, 71, 89, 180, 181, 192, 214, 256, 319, 413, 447, 522, 547, 623, 659, 756, 824, 872, 901, 920, 929, 1020, 1021, 1032, 1053, 1084, 1125, 1176, 1237, 1308, 1389, 1480, 1481, 1492, 1513, 1544, 1585, 1636, 1697, 1768, 1849, 1940, 1941, 1952, 1973, 2005
Offset: 1
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.
Crossrefs
Programs
-
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 *)
-
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
Extensions
More terms from Alois P. Heinz, Aug 13 2009
Comments