

A304367


Numbers n with additive persistence = 2.


5



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

First deviation from A298638 is at a(161); a(161) = 299, A298638(161) = 307.


LINKS

Table of n, a(n) for n=1..61.
Eric Weisstein's World of Mathematics, Additive Persistence.


FORMULA

A031286(a(n)) = 2.


EXAMPLE

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


MATHEMATICA

Select[Range@ 160, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 4 &] (* 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) == 2; \\ Michel Marcus, May 13 2018


CROSSREFS

Cf. A031286.
Cf. Numbers with additive persistence k: A304366 (k=1), A304368 (k=3), A304373 (k=4).
Sequence in context: A264834 A069529 A138335 * A298638 A291884 A173639
Adjacent sequences: A304364 A304365 A304366 * A304368 A304369 A304370


KEYWORD

nonn,base


AUTHOR

Jaroslav Krizek, May 11 2018


STATUS

approved



