A236072 Numbers n such that n^4 + n + 1 and n^4 - n - 1 are prime.
2, 5, 6, 9, 11, 26, 44, 60, 77, 147, 239, 384, 545, 690, 770, 779, 1071, 1127, 1190, 1271, 1296, 1331, 1506, 1659, 1707, 1871, 1880, 1986, 2037, 2442, 2520, 2541, 2714, 2960, 2982, 3045, 3060, 3110, 3189, 3287, 3464, 3609
Offset: 1
Keywords
Examples
384^4 + 384 + 1 and 384^4 - 384 - 1 are both prime, so 384 is a member of this sequence.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Select[Range[4000],AllTrue[#^4+{#+1,-#-1},PrimeQ]&] (* Harvey P. Dale, Jan 20 2025 *)
-
PARI
s=[]; for(n=1, 4000, if(isprime(n^4+n+1) && isprime(n^4-n-1), s=concat(s, n))); s \\ Colin Barker, Jan 19 2014
-
Python
import sympy from sympy import isprime {print(p) for p in range(10**4) if isprime(p**4-p-1) and isprime(p**4+p+1)}