login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121805 The "commas" sequence: a(1) = 1; for n > 1, let x be the least significant digit of a(n-1); then a(n) = a(n-1) + x*10 + y where y is the most significant digit of a(n) and is the smallest such y, if such a y exists. If no such y exists, stop. 5
1, 12, 35, 94, 135, 186, 248, 331, 344, 387, 461, 475, 530, 535, 590, 595, 651, 667, 744, 791, 809, 908, 997, 1068, 1149, 1240, 1241, 1252, 1273, 1304, 1345, 1396, 1457, 1528, 1609, 1700, 1701, 1712, 1733, 1764, 1805, 1856, 1917, 1988, 2070 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The sequence contains exactly 2137453 terms, with a(2137453)=99999945. The next term does not exist. - W. Edwin Clark, Dec 11 2006

It is remarkable that the sequence persists for so long. - N. J. A. Sloane, Dec 15 2006

REFERENCES

E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.

LINKS

Zak Seidov, Table of n, a(n) for n = 1..1001

Eric Angelini, (No title)

E. Angelini, The Commas Sequernce [Cached, with permission]

EXAMPLE

E.g., a(6) = 186 and a(7) = 248 = 186 + 62

Sequence..: 1, 12, 35, 94, 135, 186, 248, 331, 344, 387, 461, 475, 530, 535, ...

Differences: 11, 23, 59, 41 , 51 , 62 , 83 , 13 , 43 , 74 , 14 , 55 , 05 , 55...

MAPLE

digits:=n->ListTools:-Reverse(convert(n, base, 10)):

nextK:=proc(K) local i, L; for i from 0 to 9 do L:=K+digits(K)[ -1]*10+i; if i = digits(L)[1] then return L; fi; od; FAIL; end:

a:=proc(n) option remember: if n = 1 then return 1; fi; return nextK(a(n-1)); end: # W. Edwin Clark

MATHEMATICA

a[1] = 1; 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, 45] (* Jean-François Alcover, Nov 25 2014 *)

PROG

(PARI) a=1; for(n=1, 1000, print1(a", "); a+=a%10*10; for(k=1, 9, digits(a+k)[1]==k&&(a+=k)&&next(2)); error("blocked at a("n")=", a-a%10*10)) \\ M. F. Hasler, Jul 21 2015

CROSSREFS

Cf. A139284, A260261.

Sequence in context: A102085 A058968 A195858 * A195542 A103472 A009649

Adjacent sequences:  A121802 A121803 A121804 * A121806 A121807 A121808

KEYWORD

nonn,base,fini,nice

AUTHOR

Eric Angelini, Dec 11 2006

EXTENSIONS

More terms from Zak Seidov, Dec 11 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified July 22 18:10 EDT 2017. Contains 289671 sequences.