OFFSET
1,1
COMMENTS
LINKS
Abhiram R Devesh, Table of n, a(n) for n = 1..1000
EXAMPLE
Prime p = 3 is in this sequence as p^5 + p^3 + p + 4 = 277 (prime) and p^5 + p^3 + p - 4 = 269 (prime).
Prime p = 5 is in this sequence as p^5 + p^3 + p + 4 = 3259 (prime) and p^5 + p^3 + p - 4 = 3251 (prime).
MATHEMATICA
Select[Prime@ Range[10^4], AllTrue[#^5 + #^3 + # + {-4, 4}, PrimeQ] &] (* Michael De Vlieger, Jan 15 2018 *)
PROG
(Python)
import sympy.ntheory as snt
p=1
while p>0:
....p=snt.nextprime(p)
....pp=p+(p**3)+(p**5)-4
....qq=p+(p**3)+(p**5)+4
....if snt.isprime(pp) == True and snt.isprime(qq) == True:
........print(p)
CROSSREFS
KEYWORD
nonn
AUTHOR
Abhiram R Devesh, Jun 14 2014
STATUS
approved