OFFSET
1,2
COMMENTS
a(n) | A037123(a(n)). Sequence is infinite, including 10^(2m)-2 for all m >= 1. For each m >= 1, there is at least one n with A037123(a(n))/a(n) = m.
Number of terms < 10^m for m >= 1: 5, 12, 22, 41, 58, 79, 105, 128, 176, 202, ..., . - Robert G. Wilson v, Jul 06 2018
Certain number forms appear repeatedly: 1(9e)8, 3(9e)8, 5(9e)8, 7(9e)8, 9(9e)8, 2(9o)8, 4(9o)8, 6(9o)8, 8(9o)8; where e represents an even number of times and o an odd number of times. - Robert G. Wilson v, Jul 06 2018
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..320 (terms < 5*10^12, first 203 terms from Robert G. Wilson v)
MATHEMATICA
lst = {}; k = 1; s = 0; While[k < 10001, If[ Mod[s += Plus @@ IntegerDigits@k, k++] == 0, AppendTo[lst, k -1]]]; lst (* Robert G. Wilson v, Jul 06 2018 *)
nxt[{t_, n_}]:={t+Total[IntegerDigits[n+1]], n+1}; Select[NestList[nxt, {1, 1}, 55000], Divisible[#[[1]], #[[2]]]&][[All, 2]] (* Harvey P. Dale, Jan 18 2019 *)
PROG
(PARI) isok(n) = (sum(k=1, n, sumdigits(k)) % n) == 0; \\ Michel Marcus, Jul 16 2018
CROSSREFS
KEYWORD
base,nonn
AUTHOR
David W. Wilson, Feb 02 2006
STATUS
approved