A140208 a(n) = floor(n*Pi(n)/2).
0, 1, 3, 4, 7, 9, 14, 16, 18, 20, 27, 30, 39, 42, 45, 48, 59, 63, 76, 80, 84, 88, 103, 108, 112, 117, 121, 126, 145, 150, 170, 176, 181, 187, 192, 198, 222, 228, 234, 240, 266, 273, 301, 308, 315, 322, 352, 360, 367, 375, 382, 390, 424, 432, 440, 448, 456, 464
Offset: 1
Links
- Cino Hilliard, Sum of Primes.
Programs
-
Mathematica
a[n_]:=Floor[n*PrimePi[n]/2];Array[a,58] (* James C. McMahon, Jul 06 2025 *)
-
PARI
g(n) = for(x=1,n,print1(floor(x*primepi(x)/2)","))
Formula
Pi(n) is the prime counting function, the number of primes < n. Define SumP(n) is the sum of primes < n.
Comments