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.

A236940 Primes p such that p^4-p+1 is prime.

Original entry on oeis.org

3, 13, 19, 43, 79, 109, 313, 379, 613, 709, 1171, 1213, 1399, 1543, 1693, 1759, 1861, 1933, 2089, 2239, 2341, 2371, 2503, 2521, 2731, 2749, 3001, 3061, 3229, 3433, 3571, 3739, 3769, 4219, 4801, 4933, 4951, 4993, 5011, 5023, 5209, 5281
Offset: 1

Views

Author

Derek Orr, Feb 01 2014

Keywords

Comments

Primes in the sequence A236761.

Examples

			1213 is prime and 1213^4 - 1213 + 1 = 2164926732949 is prime. Thus, 1213 is a member of this sequence.
		

Crossrefs

Cf. A236761.

Programs

  • Magma
    [p: p in PrimesUpTo(6000) | IsPrime(p^4-p+1)]; // Vincenzo Librandi, Feb 14 2014
  • Mathematica
    Select[Prime[Range[10000]], PrimeQ[#^4 - # + 1]&] (* Vincenzo Librandi, Feb 14 2014 *)
  • PARI
    s=[]; forprime(p=2, 6000, if(isprime(p^4-p+1), s=concat(s, p))); s \\ Colin Barker, Feb 05 2014
    
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n) and isprime(n**4-n+1)}