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 A107450 #13 Aug 06 2014 04:17:09 %S A107450 0,0,0,0,1,1,1,2,1,2,1,2,1,1,2,1,2,1,2,1,2,2,2,2,2,1,1,1,2,1,2,1,2,2, %T A107450 2,1,2,2,2,2,2,2,2,2,2,3,1,1,2,2,1,2,1,1,2,2,2,2,2,2,2,2,2,1,1,2,1,2, %U A107450 2,2,2,2,2,2,3,2,2,3,1,2,2,1,1,2,2,2,2,2,2,2,2,2,3,2,2,1,2,1,2,2 %N A107450 Additive persistence of the prime numbers. %H A107450 Vincenzo Librandi, <a href="/A107450/b107450.txt">Table of n, a(n) for n = 1..1000</a> %e A107450 29 -> 2 + 9 = 11 -> 1 + 1 = 2 -> persistence = 2 %e A107450 487 -> 4 + 8 + 7 = 19 -> 1 + 9 = 10 -> 1 + 0 = 1 -> persistence = 3 %p A107450 P:=proc(n) local i,k,w,ok,cont; for i from 1 by 1 to n do k:=ithprime(i); w:=0; ok:=1; if k<10 then print(0); else cont:=1; while ok=1 do while k>0 do w:=w+(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w<10 then ok:=0; print(cont); else cont:=cont+1; k:=w; w:=1; fi; od; fi; od; end: P(100); %t A107450 Table[Length[NestWhileList[Total[IntegerDigits[#]]&,n,#>9&]]-1,{n, Prime[ Range[100]]}] (* _Harvey P. Dale_, Aug 05 2014 *) %Y A107450 Cf. A031286 (additive persistence), A129985 (multiplicative persistence of primes). %K A107450 base,easy,nonn %O A107450 1,8 %A A107450 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jun 22 2007