login
Number of primes between n^2 and (n+1/4)^2.
0

%I #5 Jun 17 2018 15:46:12

%S 0,1,0,1,0,1,0,1,1,2,0,1,1,2,2,2,1,1,1,2,2,2,0,2,1,2,2,2,1,2,2,3,4,2,

%T 3,4,2,4,2,5,3,2,2,2,3,3,2,2,3,2,3,5,2,3,3,2,5,4,2,4,3,4,1,3,5,3,5,6,

%U 4,5,2,3,3,6,7,6,2,5,6,2,6,4,4,3,5,3,7,3,6,4,6,2,6,6,6,5,7,7,6,4,4,4,6,7,6

%N Number of primes between n^2 and (n+1/4)^2.

%t Table[PrimePi[(n+1/4)^2]-PrimePi[n^2],{n,110}] (* _Harvey P. Dale_, Jun 17 2018 *)

%o (PARI) pbetweensq2(n) = { for(x=1,n, c=0; for(y=floor(x)^2,(x+1/4)^2, if(isprime(y),c++) ); print1(c",") ) }

%K easy,nonn

%O 1,10

%A _Cino Hilliard_, Dec 30 2003