OFFSET
1,2
COMMENTS
I conjecture that 25 and 64 are the only terms that are also square numbers.
The next squares are 564001 and 774400, which occur at positions 419 and 481. There are no other squares in the first 10000 terms. - T. D. Noe, Sep 11 2013
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=1 because between prime(1)=2 and 2^2=4 there's one prime (3). a(3)=6 because between prime(3)=5 and 5^2=25 there are 6 primes (7, 11, 13, 17, 19, 23).
MATHEMATICA
Table[p = Prime[n]; PrimePi[p^2] - n, {n, 100}] (* T. D. Noe, Sep 11 2013 *)
PROG
(PARI) forprime(p=2, 500, res=0; forprime(q=p+1, p^2, res=res+1); print1(res", "))
(Magma) [#PrimesInInterval(NthPrime(n), NthPrime(n)^2)-1: n in [1..70]]; // Vincenzo Librandi, Jul 23 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Jose R. Brox (tautocrona(AT)terra.es), Feb 01 2003
EXTENSIONS
Data corrected by T. D. Noe, Oct 25 2006
Edited (removing comment & correction about irrelevant property) by Peter Munn, Jan 24 2023
STATUS
approved