This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A131839 #27 Mar 02 2019 02:20:56 %S A131839 0,0,2,2,2,3,2,3,3,1,2,3,3,2,2,3,3,3,3,2,3,3,3,3,2,3,3,3,3,3,3,2,3,2, %T A131839 2,3,3,3,4,2,3,3,2,3,3,3,3,3,3,2,3,2,2,4,3,3,3,3,3,3,3,3,4,3,3,3,3,3, %U A131839 4,2,3,4,3,3,3,3,3,3,3,3,4,3,3,4,3,3,4,3,3,3,3,3,4,3,3,4,3,3,4,1,3,4,3,3,4 %N A131839 Additive persistence of Sierpinski numbers of first kind. %H A131839 Robert G. Wilson v, <a href="/A131839/b131839.txt">Table of n, a(n) for n = 1..10000</a> (first 2048 terms from Antti Karttunen) %F A131839 a(n) = A031286(A014566(n)). - _Antti Karttunen_, Dec 15 2017 %e A131839 Sierpinski number 257 --> 2+5+7 = 14 --> 1+4 = 5 thus persistence is 2. %e A131839 The sixteenth Sierpinski number is 16^16 + 1 = 18446744073709551617 --> 1+8+4+4+6+7+4+4+0+7+3+7+0+9+5+5+1+6+1+7 = 89 --> 8+9 = 17 --> 1+7 = 8, thus a(16) = 3 because in three steps we obtain a number < 10. - _Antti Karttunen_, Dec 15 2017 %p A131839 f:= proc(n) local t, count; %p A131839 t:= n^n+1; %p A131839 count:= 0; %p A131839 while t > 9 do %p A131839 count:= count+1; %p A131839 t:= convert(convert(t,base,10),`+`); %p A131839 od; %p A131839 count %p A131839 end proc: %p A131839 map(f, [$1..100]); # _Robert Israel_, Dec 18 2017 %t A131839 f[n_] := Length@ NestWhileList[Plus @@ IntegerDigits@# &, n^n + 1, UnsameQ@## &, All] - 2; Array[f, 105] (* _Robert G. Wilson v_, Dec 18 2017 *) %o A131839 (PARI) %o A131839 allocatemem(2^30); %o A131839 A007953(n) = { my(s); while(n, s+=n%10; n\=10); s; }; %o A131839 A031286(n) = { my(s); while(n>9, s++; n=A007953(n)); s; }; \\ This function after _Charles R Greathouse IV_, Sep 13 2012 %o A131839 A014566(n) = (1+(n^n)); %o A131839 A131839(n) = A031286(A014566(n)); \\ _Antti Karttunen_, Dec 15 2017 %Y A131839 Cf. A014566, A131836. %K A131839 easy,nonn,base %O A131839 1,3 %A A131839 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 20 2007 %E A131839 Erroneous terms (first at n=16) corrected by _Antti Karttunen_, Dec 15 2017