A247509 Number of preprimes (A156759, n>1) such that the smallest prime divisor equals prime(n).
3, 3, 2, 4, 2, 3, 2, 2, 3, 2, 4, 3, 2, 2, 3, 3, 2, 4, 3, 2, 3, 2, 2, 4, 3, 2, 3, 2, 2, 5, 2, 3, 2, 4, 2, 3, 3, 2, 3, 3, 2, 5, 2, 3, 2, 3, 5, 3, 2, 2, 3, 2, 3, 3, 3, 3, 2, 4, 3, 2, 2, 5, 3, 2, 2, 3, 2, 4, 2, 2, 2, 3, 3, 3, 2, 2, 3, 2, 2, 3, 2, 4, 2, 3, 2, 2, 4
Offset: 1
Keywords
Examples
For n=2, using the formula, we have a(2)=pi(25/3)-1=3.
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..1000
- Vladimir Shevelev, A classification of the positive integers over primes
Programs
-
Mathematica
a[1] = 3;a[n_] := PrimePi[Prime[n + 1]^2 / Prime[n]] - n + 1; Table[a[n], {n, 1, 87}] (* Indranil Ghosh, Mar 09 2017 *)
-
PARI
for (n=1, 87, print1(if(n==1, 3, primepi(prime(n + 1)^2 / prime(n)) - n + 1),", ")) \\ Indranil Ghosh, Mar 09 2017
Formula
For n>1, a(n) = pi(prime(n+1)^2/prime(n))-n +1, where pi(x) is the prime counting function (cf. A000720). - Vladimir Shevelev, Sep 28 2014
Extensions
More terms from Peter J. C. Moses, Sep 18 2014