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 (prime) and p^3 + 4 = 31 (prime).
p = 7 is in this sequence because p + 4 = 11 (prime) and p^3 + 4 = 347 (prime).
PROG
(Python)
import sympy.ntheory as snt
n=2
while n>1:
....n1=n+4
....n2=((n**3)+4)
....##Check if n1 and n2 are also primes.
....if snt.isprime(n1)== True and snt.isprime(n2)== True:
........print(n, " , " , n1, " , ", n2)
....n=snt.nextprime(n)
(PARI) s=[]; forprime(p=2, 20000, if(isprime(p+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