login
Number of preprimes (A156759, n>1) such that the smallest prime divisor equals prime(n).
8

%I #21 Jan 02 2023 12:30:50

%S 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,

%T 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,

%U 2,2,2,3,3,3,2,2,3,2,2,3,2,4,2,3,2,2,4

%N Number of preprimes (A156759, n>1) such that the smallest prime divisor equals prime(n).

%H Indranil Ghosh, <a href="/A247509/b247509.txt">Table of n, a(n) for n = 1..1000</a>

%H Vladimir Shevelev, <a href="http://list.seqfan.eu/oldermail/seqfan/2014-September/013643.html">A classification of the positive integers over primes</a>

%F 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

%e For n=2, using the formula, we have a(2)=pi(25/3)-1=3.

%t 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 *)

%o (PARI) for (n=1, 87, print1(if(n==1, 3, primepi(prime(n + 1)^2 / prime(n)) - n + 1),", ")) \\ _Indranil Ghosh_, Mar 09 2017

%Y Cf. A000040, A156759, A247393, A247394.

%K nonn

%O 1,1

%A _Vladimir Shevelev_, Sep 18 2014

%E More terms from _Peter J. C. Moses_, Sep 18 2014