A304367 Numbers n with additive persistence = 2.
19, 28, 29, 37, 38, 39, 46, 47, 48, 49, 55, 56, 57, 58, 59, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 109, 118, 119, 127, 128, 129, 136, 137, 138, 139, 145, 146, 147, 148, 149, 154
Offset: 1
Examples
Repeatedly taking the sum of digits starting with 19 gives 10 and then 1. There are two steps, so the additive persistence is 2, and 19 is a member. - _Michael B. Porter_, May 16 2018
Links
- Eric Weisstein's World of Mathematics, Additive Persistence.
Crossrefs
Programs
-
Mathematica
Select[Range@ 160, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 4 &] (* Michael De Vlieger, May 14 2018 *)
-
PARI
nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;} isok(n) = nb(n) == 2; \\ Michel Marcus, May 13 2018
Formula
A031286(a(n)) = 2.
Comments