A064483 Numbers k such that k^2 + prime(k) and k^2 - prime(k) are both primes.
12, 30, 60, 96, 336, 660, 702, 756, 984, 990, 1188, 1302, 1488, 1830, 1866, 2070, 2142, 2340, 2586, 2874, 2910, 3618, 3714, 3750, 3774, 3906, 4008, 4470, 4512, 4902, 5094, 5754, 6012, 6174, 6432, 6840, 6846, 6930, 7446, 7578, 7734, 8064, 8190, 8328
Offset: 1
Examples
12 is in the sequence because 144 +/- 37 = 181 and 107 which are both primes. k=30 is a term: 30^2 = 900, prime(30) = 113, 900+113 = 1013 and 900-113 = 787, both primes.
Links
- Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
Crossrefs
Programs
-
Mathematica
Select[ Range[10^4], PrimeQ[ #^2 + Prime[ # ]] && PrimeQ[ #^2 - Prime[ # ]] &]
-
PARI
for(n=1,20000, if(isprime(n^2+prime(n)) && isprime(n^2-prime(n)), print1(n," ")))
-
PARI
{ n=0; default(primelimit, 6100000); for (m=1, 10^9, if (isprime(m^2 + prime(m)) && isprime(m^2 - prime(m)), write("b064483.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 16 2009
Comments