A236766 Numbers n such that n^4 +/- n +/- 1 are prime for all four possibilities.
6, 9, 7266, 115131, 380529, 536646, 636609, 818526, 922734, 1389015, 1660119, 2045415, 2085726, 2262420, 2469396, 2722260, 2836374, 2954250, 3146904, 3614226, 3949770, 4062465, 4110834, 4211499, 4400100, 5081055, 5324424, 5434794, 5436090
Offset: 1
Keywords
Examples
380529^4+380529+1 (20967711831335262645811), 380529^4+380529-1 (20967711831335262645809), 380529^4-380529+1 (20967711831335261884753), and 380529^4-380529-1 (20967711831335261884751) are all prime. Thus, 380529 is a member of this sequence.
Programs
-
Mathematica
Select[Range[55*10^5],AllTrue[#^4+{(#-1),(#+1),(-#-1),(-#+1)},PrimeQ]&] (* Harvey P. Dale, Nov 02 2024 *)
-
PARI
for(n=1, 5000000, if(isprime(n^4+n+1)&&isprime(n^4-n+1)&&isprime(n^4+n-1)&&isprime(n^4-n-1), print1(n, ","))) \\ Colin Barker, Jan 31 2014
-
Python
import sympy from sympy import isprime {print(n) for n in range(10**7) if isprime(n**4+n+1) and isprime(n**4-n+1) and isprime(n**4+n-1) and isprime(n**4-n-1)}