OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 3 is prime; 5 is the next prime: 3^3*5^3 + 3^3 + 5^3 = 27*125 + 27 + 125 = 3527 that is a prime.
a(3) = 7 is prime; 11 is the next prime: 7^3*11^3 + 7^3 + 11^3 = 343*1331 + 343 + 1331 = 458207 that is a prime.
MAPLE
select(p -> andmap(isprime, [p, (p^3*nextprime(p)^3+p^3+nextprime(p)^3)]), [seq(p, p=1..10^4)]);
MATHEMATICA
Prime@Select[Range[1000], PrimeQ[Prime[#]^3*Prime[# + 1]^3 + Prime[#]^3 + Prime[# + 1]^3] &]
PROG
(Magma) [p: p in PrimesUpTo (5000) | IsPrime(p^3*q^3+p^3+q^3)];
(PARI) is(n) = my(q=nextprime(n+1)); ispseudoprime(n^3*q^3+n^3+q^3)
forprime(p=1, 3700, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Aug 22 2017
(PARI) list(lim)=my(v=List(), p=2, p3=8, q3); forprime(q=3, nextprime(lim\1+1), q3=q^3; if(isprime(p3*q3+p3+q3), listput(v, p)); p=q; p3=q3); Vec(v) \\ Charles R Greathouse IV, Aug 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Aug 22 2017
STATUS
approved