OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..250 from Abhiram R Devesh)
EXAMPLE
p=7 is in this sequence as p + 4, p^3 + 4, p^5 + 4 (11, 347, 16811) are all prime.
p=5503 is in this sequence as p + 4 = 5507 (prime), p^3 + 4 = 166647398531 (prime) and p^5 + 4 = 5046584669419727747 (prime).
MATHEMATICA
Select[Range[500000], PrimeQ[#] && AllTrue[#^{1, 3, 5} + 4, PrimeQ] &] (* Amiram Eldar, Apr 04 2020 *)
PROG
(Python)
import sympy.ntheory as snt
n=2
while n>1:
....n1=n+4
....n2=((n**3)+4)
....n3=((n**5)+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, n1, n2, n3)
....n=snt.nextprime(n)
(PARI) s=[]; forprime(p=2, 200000, if(isprime(p+4) && isprime(p^3+4) && isprime(p^5+4), s=concat(s, p))); s \\ Colin Barker, Jun 11 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Abhiram R Devesh, Jun 10 2014
STATUS
approved