A060207 Start at 2^n, iterate function PrimePi (A000720) until fixed point is reached; sequence gives number of steps.
2, 3, 4, 5, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22
Offset: 0
Keywords
Examples
n=24, the relevant list is: {16777216,1077871,84115,8198,1028,172,39,12,5,3,2,1,0}, its length a(24)=13.
Links
- S. Segal, On pi(x+y)<=pi(x)+pi(y), Transactions American Mathematical Society, 104 (1962), 523-527.
Programs
-
Mathematica
Table[Length[FixedPointList[PrimePi, 2^w]]-1, {w, 0, 32}] f[n_] := Length@ NestWhileList[ PrimePi, 2^n, # > 0 &]; Array[f, 48, 0] (* Robert G. Wilson v, Aug 12 2011 *)
-
PARI
a(n) = {my(c=2, k=2^n); while(k=primepi(k), c++); c; } \\ Jinyuan Wang, May 16 2020
Extensions
More terms from David Wasserman, May 31 2002
Comments