login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269306 a(n+1) is the smallest integer such that the difference between its digital sum and the digital sum of a(n) is n. 1
0, 1, 3, 6, 19, 69, 399, 1999, 9999, 99999, 1999999, 39999999, 699999999, 19999999999, 699999999999, 39999999999999, 1999999999999999, 99999999999999999, 9999999999999999999, 1999999999999999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The digital sums are the triangular numbers A000217. A similar idea is in A268605 (thanks to Michel Marcus for this comment).
LINKS
EXAMPLE
a(8) = 1999 and 1 + 9 + 9 + 9 = 28; so a(9) = 9999 because 9 + 9 + 9 + 9 = 36 and 36 - 28 = 8.
PROG
(Python)
s = 0
for i in range(1, 100):
..alfa = ""
..k = i + s
..s = k
..while k > 9:
....alfa = alfa + "9"
....k = k - 9
..alfa = str(k)+alfa
..print alfa
(PARI) findnext(x, k) = {sx = sumdigits(x); y = 1; while (sumdigits(y) - sx != k, y++); y; }
lista(nn) = {print1(x = 0, ", "); for (k=1, nn, y = findnext(x, k); print1(y, ", "); x = y; ); }
CROSSREFS
Sequence in context: A184937 A215817 A365119 * A326317 A306522 A290784
KEYWORD
nonn,base
AUTHOR
Francesco Di Matteo, Feb 23 2016
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:40 EDT 2024. Contains 371936 sequences. (Running on oeis4.)