The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A248050 Lexicographically earliest increasing sequence such that a(n) equals the sum of digits of the terms up to and including a(n). 1
 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 99, 108, 117, 126, 135, 144, 153, 162, 171, 180, 198, 207, 216, 225, 234, 243, 252, 261, 279, 297, 306, 315, 324, 333, 342, 351, 360, 378, 396, 405, 414, 423, 432, 441, 459, 477, 495, 504, 513, 522, 531, 540, 558, 576, 594, 603, 612, 621, 639, 657, 675, 693, 702, 711, 720, 738, 756, 774, 792 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS The offset could equally well be chosen to be 1, but taking it equal to zero allows us to consider {a(n); n=0,1,2...} and {a(n); n=1,2...} together, both of which satisfy the definition. All terms are divisible by 9, but there is no limit on the size of the gaps. The first gap of 18 occurs after a(9)=81 followed by a(10)=99, the first gap of 27 after a(79)=972 followed by a(80)=999. There seems also to be no limit on the "look-ahead" required to avoid getting stuck by a bad choice. LINKS M. F. Hasler, Table of n, a(n) for n = 0..1000 E. Angelini, Cumulative sum of the digits used so far, SeqFan mailing list, Oct 30 2014 PROG (PARI) a(n, a=0, L=19)={local(ok(n, L)=!L||for(k=1, #Str(n), sumdigits(n+=9)/9==k&&ok(n, L-1)&&return(n))); for(i=1, n, print1(s=a", "); until(s+sumdigits(a+=9)==a&&ok(a, L), )); a} CROSSREFS Sequence in context: A052223 A085132 A111708 * A044052 A131418 A249605 Adjacent sequences: A248047 A248048 A248049 * A248051 A248052 A248053 KEYWORD nonn,base AUTHOR Eric Angelini and M. F. Hasler, Oct 30 2014 STATUS approved

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

Last modified September 22 07:44 EDT 2023. Contains 365519 sequences. (Running on oeis4.)