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.

A236171 Numbers k such that k^2 - k - 1, k^3 - k - 1, and k^4 - k - 1 are all prime.

Original entry on oeis.org

4, 9, 11, 16, 55, 60, 71, 189, 361, 450, 469, 669, 1261, 1351, 1490, 1591, 2101, 2254, 2396, 2594, 3774, 3866, 4011, 5375, 5551, 5840, 6070, 7336, 7545, 7666, 7735, 8105, 8255, 9825, 10525, 11621, 12100, 13084, 13454
Offset: 1

Views

Author

Derek Orr, Jan 19 2014

Keywords

Examples

			3866^2 - 3866 - 1, 3866^3 - 3866 - 1, and 3866^4 - 3866 - 1 are all prime, so 3866 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[15000], And @@ PrimeQ[#^Range[2, 4] - # - 1] &] (* Amiram Eldar, Mar 21 2020 *)
  • PARI
    s=[]; for(n=1, 20000, if(isprime(n^2-n-1) && isprime(n^3-n-1) && isprime(n^4-n-1), s=concat(s, n))); s \\ Colin Barker, Jan 20 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**5) if isprime(n**2-n-1) and isprime(n**3-n-1) and isprime(n**4-n-1)}