A337334 a(n) = pi(b(n)), where pi is the prime counting function (A000720) and b(n) = a(n-1) + b(n-1) with a(0) = b(0) = 1.
1, 1, 2, 3, 4, 5, 7, 9, 11, 14, 16, 21, 24, 30, 35, 42, 48, 58, 67, 78, 91, 103, 121, 138, 158, 181, 205, 233, 266, 298, 337, 378, 429, 480, 539, 602, 674, 751, 838, 930, 1031, 1147, 1274, 1402, 1556, 1715, 1896, 2090, 2296, 2527, 2777, 3047, 3340, 3669, 4016
Offset: 0
Keywords
Examples
a(1) = pi(b(1)) = pi(a(0) + b(0)) = pi(1 + 1) = pi(2) = 1 a(2) = pi(b(2)) = pi(a(1) + b(1)) = pi(1 + 2) = pi(3) = 2 a(3) = pi(b(3)) = pi(a(2) + b(2)) = pi(2 + 3) = pi(5) = 3 a(4) = pi(b(4)) = pi(a(3) + b(3)) = pi(3 + 5) = pi(8) = 4 a(54)= pi(b(54))= pi(a(53)+ b(53))= pi(3669+34327)=pi(37996)=4016
Links
- Ya-Ping Lu and Shu-Fang Deng, An upper bound for the prime gap, arXiv:2007.15282 [math.GM], 2020.
Programs
-
Maple
A337334 := proc(n) option remember; if n = 0 then 1; else numtheory[pi](A061535(n)) ; end if; end proc: seq(A337334(n),n=0..20) ; # R. J. Mathar, Jun 18 2021
-
Python
from sympy import primepi a_last = 1 b_last = 1 for n in range(1, 1001): b = a_last + b_last a = primepi(b) print(a) a_last = a b_last = b
Formula
a(n) = pi(b(n)), where b(n) = a(n-1) + b(n-1) with a(0) = b(0) = 1.
Extensions
a(0) inserted by R. J. Mathar, Jun 18 2021
Comments