|
|
A244510
|
|
a(0)=0; for n>0, choose a(n) to be the smallest number > a(n-1) such that the condition a(n) > Sum_{k=0..n} digsum(a(k)) holds.
|
|
5
|
|
|
0, 10, 11, 12, 13, 20, 21, 22, 30, 31, 32, 40, 41, 50, 60, 61, 70, 80, 90, 100, 101, 102, 103, 104, 105, 110, 111, 120, 121, 122, 130, 131, 140, 141, 150, 160, 170, 171, 180, 190, 200, 201, 202, 210, 211, 212, 220, 221, 230, 231, 240, 250, 260, 261, 270, 280
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
a(6)=21 because the digital sum of a(0)..a(5) is 12, and 21 is the smallest number greater than a(5)=20 and also greater than 12 + digital sum of 21.
|
|
PROG
|
(PARI) lista(nn) = {prec = 0; v = [0]; sdprec = 0; print1(prec, ", "); for (n=1, nn, new = prec + 1; while ((sdprec+sumdigits(new)) >= new, new ++); v = concat(v, new); print1(new, ", "); sdprec += sumdigits(new); prec = new; ); } \\ Michel Marcus, Feb 28 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|