OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 11 is prime; 13 is the next prime: 11^3*13^3 + 11 + 13 = 1331*2197 + 11 + 13 = 2924231 that is a prime.
a(2) = 17 is prime; 19 is the next prime: 17^3*19^3 + 17 + 19 = 4913*6859 + 17 + 19 = 33698303 that is a prime.
MAPLE
select(p -> andmap(isprime, [p, (p^3*nextprime(p)^3+p+nextprime(p))]), [seq(p, p=1..10^4)]);
MATHEMATICA
Prime@Select[Range[1000], PrimeQ[Prime[#]^3* Prime[# + 1]^3 + Prime[#] + Prime[# + 1]] &]
PROG
(PARI) forprime(p=1, 5000, q=nextprime(p+1); if(ispseudoprime(p^3*q^3 + p + q), print1(p, ", ")));
(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+p+q), listput(v, p)); p=q; p3=q3); Vec(v) \\ Charles R Greathouse IV, Aug 23 2017
(Magma) [p: p in PrimesUpTo(5000) | IsPrime(p^3*q^3 + p + q) where q is NextPrime(p)];
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Aug 23 2017
STATUS
approved