cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236072 Numbers n such that n^4 + n + 1 and n^4 - n - 1 are prime.

Original entry on oeis.org

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

Views

Author

Derek Orr, Jan 19 2014

Keywords

Examples

			384^4 + 384 + 1 and 384^4 - 384 - 1 are both prime, so 384 is a member of this sequence.
		

Crossrefs

Numbers in both A126424 and A049408.

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)}