login
A073946
Squares k such that k + pi(k) is a prime.
3
9, 36, 81, 121, 361, 625, 961, 3136, 6724, 8281, 9604, 10609, 12996, 13225, 19881, 25281, 38025, 39204, 40000, 43264, 44944, 45796, 47961, 60516, 64009, 79524, 80089, 80656, 83521, 86436, 90000, 93636, 103684, 117649, 121801, 129600
OFFSET
1,1
LINKS
EXAMPLE
a(1)=9, since 9 is a square, pi(9)=4 and 9+4=13 is a prime.
MAPLE
select(t -> isprime(t + numtheory:-pi(t)), [seq(i^2, i=1..1000)]); # Robert Israel, Mar 21 2017
MATHEMATICA
Select[Range[1000]^2, PrimeQ[# + PrimePi[#]] &] (* Indranil Ghosh, Mar 21 2017 *)
PROG
(PARI)
v=vector(1000);
for(n=1, 1000, v[n] = n^2);
for(n=1, 1000, if(isprime(v[n] + primepi(v[n])), print1(v[n], ", "))) \\ Indranil Ghosh, Mar 21 2017
(Python)
from sympy import primepi, isprime
N = (x**2 for x in range(1, 1001))
print([n for n in N if isprime(n + primepi(n))]) # Indranil Ghosh, Mar 21 2017
CROSSREFS
This sequence is a subsequence of sequence A077510. The corresponding sequence of primes is A113943 and the square roots of the original sequence is A113944.
Sequence in context: A068810 A077115 A297584 * A016766 A242538 A083353
KEYWORD
nonn
AUTHOR
David Garber, Nov 13 2002
STATUS
approved