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”).

Primes p such that p^4 + p + 1 and p^4 - p - 1 are also prime.
0

%I #7 Jan 19 2014 04:43:21

%S 2,5,11,239,1871,4001,4397,6971,12647,12689,13337,13619,15401,19391,

%T 19559,19739,20201,20297,22871,22937,28307,30029,32561,36299,36929,

%U 39569,44279,45497,47441,48767,50069,53897,55871

%N Primes p such that p^4 + p + 1 and p^4 - p - 1 are also prime.

%C Primes in the sequence A236072.

%e 6971 is prime, 6971^4 - 6971 - 1 is prime, and 6971^4 + 6971 + 1 is prime. So 6971 is a member of this sequence.

%o (Python)

%o import sympy

%o from sympy import isprime

%o {print(p) for p in range(10**5) if isprime(p**4+p+1) and isprime(p**4-p-1) and isprime(p)}

%o (PARI) s=[]; forprime(p=2, 55871, if(isprime(p^4+p+1)&&isprime(p^4-p-1), s=concat(s, p))); s \\ _Colin Barker_, Jan 19 2014

%Y Cf. A236072, A236071, A236044.

%K nonn

%O 1,1

%A _Derek Orr_, Jan 19 2014