The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243734 Primes p for which p + 4, p^2 + 4 and p^3 + 4 are primes. 1
3, 7, 103, 277, 487, 967, 4783, 5503, 5923, 8233, 21013, 26317, 27943, 41593, 55213, 78307, 78853, 86197, 89653, 94723, 99013, 123727, 148153, 157177, 166627, 172867, 177883, 179107, 185893, 192883, 194713, 203767, 204517, 223633, 225217, 227593, 236893 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is a subset of the sequences:
A023200: Primes p such that p + 4 is also prime.
A243583: Primes p for which p + 4 and p^3 + 4 are primes.
p is either 2 mod 5 or 3 mod 5, hence p^4 + 4 is 0 mod 5.
LINKS
EXAMPLE
p = 3 is in this sequence because p + 4 = 7, p^2 + 4 = 13 and p^3 + 4 = 31 are all primes.
p : p+4, p^2+4, p^3+4
7 : 11, 53, 347
103: 107, 10613, 1092731
277: 281, 76733, 21253937
487: 491, 237173, 115501307
PROG
(Python)
import sympy.ntheory as snt
n=2
while n>1:
....n1=n+4
....n2=((n**2)+4)
....n3=((n**3)+4)
....##Check if n1, n2 and n3 are also primes.
....if snt.isprime(n1)== True and snt.isprime(n2)== True and snt.isprime(n2)== True:
........print(n, " , " , n1, " , ", n2, " , ", n3)
....n=snt.nextprime(n)
(PARI) s=[]; forprime(p=2, 200000, if(isprime(p+4) && isprime(p^2+4) && isprime(p^3+4), s=concat(s, p))); s \\ Colin Barker, Jun 11 2014
CROSSREFS
Sequence in context: A362682 A299377 A129660 * A158467 A260824 A028414
KEYWORD
nonn,easy
AUTHOR
Abhiram R Devesh, Jun 09 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 20:14 EDT 2024. Contains 372549 sequences. (Running on oeis4.)