login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A243861
Primes p for which p^i - 4 is prime for i = 1, 3, 5 and 7.
2
971, 12641, 205607, 228341, 276557, 412343, 1012217, 1101323, 1902881, 2171021, 2477411, 2692121, 4116377, 4311677, 6060953, 6182993, 6388913, 6444863, 8341121, 8551451, 9507527, 10523141, 10997411, 11444093, 14101361, 14656307, 14813147, 15435587, 17337521
OFFSET
1,1
COMMENTS
Subsequence of A243818: Primes p for which p^i - 4 is prime for i = 1, 3 and 5.
LINKS
EXAMPLE
Prime p=971 is in this sequence because p-4 = 967 (prime), p^3-4 = 915498607 (prime), p^5-4 = 863169625893847 (prime), and p^7-4 = 813831713247384370687 (prime).
PROG
(Python)
import sympy.ntheory as snt
n=2
while n>1:
....n1=n-4
....n2=((n**3)-4)
....n3=((n**5)-4)
....n4=((n**7)-4)
....##Check if n1 , n2, n3 and n4 are also primes.
....if snt.isprime(n1)== True and snt.isprime(n2)== True and snt.isprime(n3)== True and snt.isprime(n4)== True:
........print(n, n1, n2, n3, n4)
....n=snt.nextprime(n)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Abhiram R Devesh, Jun 12 2014
STATUS
approved