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!)
A243583 Primes p for which p + 4 and p^3 + 4 are primes. 5
3, 7, 19, 79, 103, 109, 277, 379, 487, 967, 1489, 1663, 1867, 2857, 3019, 3253, 3613, 3697, 4003, 4783, 4969, 5413, 5437, 5503, 5569, 5647, 5923, 7477, 7669, 7687, 7699, 7789, 7933, 8233, 8779, 9007, 9319, 9547, 9739, 10597, 11257, 11467, 11593, 11827, 12037 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is a subsequence of:
A023200: Primes p such that p + 4 is also prime.
A073573: Numbers n such that n^3 + 4 is prime.
LINKS
EXAMPLE
p = 3 is in this sequence because p + 4 = 7 (prime) and p^3 + 4 = 31 (prime).
p = 7 is in this sequence because p + 4 = 11 (prime) and p^3 + 4 = 347 (prime).
PROG
(Python)
import sympy.ntheory as snt
n=2
while n>1:
....n1=n+4
....n2=((n**3)+4)
....##Check if n1 and n2 are also primes.
....if snt.isprime(n1)== True and snt.isprime(n2)== True:
........print(n, " , " , n1, " , ", n2)
....n=snt.nextprime(n)
(PARI) s=[]; forprime(p=2, 20000, if(isprime(p+4) && isprime(p^3+4), s=concat(s, p))); s \\ Colin Barker, Jun 11 2014
CROSSREFS
Sequence in context: A163571 A217611 A322852 * A215487 A146037 A172514
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 March 29 08:13 EDT 2024. Contains 371265 sequences. (Running on oeis4.)