OFFSET
1,1
LINKS
Abhiram R Devesh, Table of n, a(n) for n = 1..50
EXAMPLE
p = 132749 (prime);
p + 2 = 132751 (prime);
p^3 + 2 = 2339342304585751 (prime);
p^5 + 2 = 41224584878413873150038751 (prime);
p^7 + 2 = 726471878470342746448722269536491751 (prime).
PROG
(Python)
import sympy
from sympy.ntheory import isprime, nextprime
n=2
while True:
n1=n+2
n2=n**3+2
n3=n**5+2
n4=n**7+2
##.Check if n1, n2, n3 and n4 are also primes
if all(isprime(x) for x in [n1, n2, n3, n4]):
print(n, ", ", n1, ", ", n2, ", ", n3, ", ", n4)
n=nextprime(n)
(PARI) isok(p) = isprime(p) && isprime(p+2) && isprime(p^3+2) && isprime(p^5+2) && isprime(p^7+2); \\ Michel Marcus, May 15 2014
(Sage)
def is_A242327(n):
return is_prime(n) and all([is_prime(n^(2*k+1)+2) for k in range(4)])
filter(is_A242327, range(3940800)) # Peter Luschny, May 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Abhiram R Devesh, May 10 2014
STATUS
approved