login
Numbers with additive persistence = 1.
6

%I #23 Dec 28 2023 16:11:41

%S 10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,30,31,32,33,34,35,

%T 36,40,41,42,43,44,45,50,51,52,53,54,60,61,62,63,70,71,72,80,81,90,

%U 100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116

%N Numbers with additive persistence = 1.

%C For d >= 2, there are A000581(d+8) terms with d digits. - _Robert Israel_, Dec 28 2023

%H Robert Israel, <a href="/A304366/b304366.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AdditivePersistence.html">Additive Persistence.</a>

%F A031286(a(n)) = 1.

%e 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

%p select(t -> convert(convert(t,base,10),`+`) < 10, [$10 .. 200]); # _Robert Israel_, Dec 28 2023

%t Select[Range@ 120, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 3 &] (* _Michael De Vlieger_, May 14 2018 *)

%o (PARI) nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;}

%o isok(n) = nb(n) == 1; \\ _Michel Marcus_, May 13 2018

%Y Cf. A000581, A031286.

%Y Cf. Numbers with additive persistence k: A304367 (k=2), A304368 (k=3), A304373 (k=4).

%K nonn,base

%O 1,1

%A _Jaroslav Krizek_, May 11 2018