OFFSET
1,1
COMMENTS
FORMULA
a(n) = A086968(n)^2 - pi(a(n)).
EXAMPLE
37 is a term because 37 is 12th prime and 37 + 12 = 49 = 7^2.
MAPLE
q:= n-> isprime(n) and issqr(n+numtheory[pi](n)):
select(q, [$0..150000])[]; # Alois P. Heinz, Oct 27 2021
MATHEMATICA
Select[Prime@Range[10^4], IntegerQ@Sqrt[PrimePi@#+#]&] (* Giorgos Kalogeropoulos, Oct 26 2021 *)
PROG
(PARI) isok(n) = isprime(n) && issquare(n + primepi(n)); \\ Michel Marcus, Oct 05 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 26 2005
EXTENSIONS
Definition corrected by Michel Marcus, Oct 05 2013
STATUS
approved