OFFSET
1,1
COMMENTS
For d >= 2, there are A000581(d+8) terms with d digits. - Robert Israel, Dec 28 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Additive Persistence.
FORMULA
A031286(a(n)) = 1.
EXAMPLE
Adding the digits of 10 gives 1, a single-digit number, so 10 is a member. Adding the digits of 39 gives 12, which is a 2-digit number, so 39 is not a member. - Michael B. Porter, May 16 2018
MAPLE
select(t -> convert(convert(t, base, 10), `+`) < 10, [$10 .. 200]); # Robert Israel, Dec 28 2023
MATHEMATICA
Select[Range@ 120, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 3 &] (* Michael De Vlieger, May 14 2018 *)
PROG
(PARI) nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba; }
isok(n) = nb(n) == 1; \\ Michel Marcus, May 13 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, May 11 2018
STATUS
approved