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 = 11 is in this sequence because p - 4 = 7 (prime), p^3 - 4 = 1327 (prime) and p^5 - 4 = 161047 (prime).
p = 971 is in this sequence because p - 4 = 967 (prime), p^3 - 4 = 915498607 (prime) and p^5 - 4 = 863169625893847 (prime).
MATHEMATICA
Select[Range[300000], PrimeQ[#] && AllTrue[#^{1, 3, 5} - 4, PrimeQ] &] (* Amiram Eldar, Apr 04 2020 *)
Select[Prime[Range[27000]], AllTrue[#^{1, 3, 5}-4, PrimeQ]&] (* Harvey P. Dale, Jan 04 2021 *)
PROG
(Python)
import sympy.ntheory as snt
n=5
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)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Abhiram R Devesh, Jun 11 2014
STATUS
approved