OFFSET
1,1
COMMENTS
LINKS
Abhiram R Devesh, Table of n, a(n) for n = 1..1000
EXAMPLE
p = 3 is in this sequence because p + 4 = 7, p^2 + 4 = 13 and p^3 + 4 = 31 are all primes.
p : p+4, p^2+4, p^3+4
7 : 11, 53, 347
103: 107, 10613, 1092731
277: 281, 76733, 21253937
487: 491, 237173, 115501307
PROG
(Python)
import sympy.ntheory as snt
n=2
while n > 1 and n < 10**6:
n1=n+4
n2=((n**2)+4)
n3=((n**3)+4)
##Check if n1, n2 and n3 are also primes.
if snt.isprime(n1)== True and snt.isprime(n2)== True and snt.isprime(n3)== True:
print(n, end=', ')
n=snt.nextprime(n)
(PARI) s=[]; forprime(p=2, 200000, if(isprime(p+4) && isprime(p^2+4) && isprime(p^3+4), s=concat(s, p))); s \\ Colin Barker, Jun 11 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Abhiram R Devesh, Jun 09 2014
STATUS
approved