login
A242327
Primes p for which (p^n) + 2 is prime for n = 1, 3, 5, and 7.
2
132749, 1175411, 3940799, 5278571, 11047709, 12390251, 15118769, 21967241, 22234871, 26568929, 31809959, 32229341, 32969591, 35760551, 38704661, 43124831, 43991081, 49248971, 50227211, 51140861, 53221631, 55568171, 59446109, 63671651, 71109161, 76675589
OFFSET
1,1
COMMENTS
Subsequence of A001359 and A048637.
LINKS
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