A304373 Numbers n with additive persistence = 4.
19999999999999999999999, 28999999999999999999999, 29899999999999999999999, 29989999999999999999999, 29998999999999999999999, 29999899999999999999999, 29999989999999999999999, 29999998999999999999999, 29999999899999999999999, 29999999989999999999999
Offset: 1
Examples
Repeatedly taking the sum of digits starting with 19999999999999999999999 gives 199, 19, 10 and 1. There are four steps, so the additive persistence is 4 and 19999999999999999999999 is a member.
Links
- Eric Weisstein's World of Mathematics, Additive Persistence
Crossrefs
Programs
-
Mathematica
Take[ Sort@ Flatten[ (FromDigits /@ Permutations@#) & /@ IntegerPartitions[ 199, {23}, Range@ 9]], 10000] (* first 10000 terms, Giovanni Resta, May 29 2018 *)
-
PARI
nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;} isok(n) = nb(n) == 4; \\ Michel Marcus, May 29 2018
Formula
A031286(a(n)) = 4.