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.

Showing 1-3 of 3 results.

A236173 Primes p such that p^2 - p - 1, p^3 - p - 1 and p^4 - p - 1 are all prime.

Original entry on oeis.org

11, 71, 11621, 28151, 32089, 37501, 39209, 45329, 66161, 76649, 114599, 122131, 136949, 154991, 202999, 228901, 243391, 270269, 296911, 313909, 318679, 333701, 343309, 359291, 369979, 371281, 371981, 373171, 373459
Offset: 1

Views

Author

Derek Orr, Jan 19 2014

Keywords

Comments

Primes in A236171. All primes appear to end in a 1 or a 9 (congruent to either 1 mod 10 or 9 mod 10).

Examples

			228901 is prime, 228901^2 - 228901 - 1 is prime, 228901^3 - 228901 - 1 is prime, and 228901^4 - 228901 - 1 is prime. So 228901 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[32000]],AllTrue[#^{2,3,4}-#-1,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    s=[]; forprime(p=2, 400000, if(isprime(p^2-p-1) && isprime(p^3-p-1) && isprime(p^4-p-1), s=concat(s, p))); s \\ Colin Barker, Jan 20 2014
  • Python
    import sympy
    from sympy import isprime
    {print(p) for p in range(10**6) if isprime(p) and isprime(p**2-p-1) and isprime(p**3-p-1) and isprime(p**4-p-1)}
    

A236952 Primes p such that p^4 - p +/- 1 are twin primes.

Original entry on oeis.org

13, 79, 3571, 3739, 5023, 5443, 7459, 7621, 10243, 13339, 14251, 17359, 17551, 17863, 17971, 18061, 19483, 21481, 27631, 32611, 37501, 38821, 48463, 49711, 54709, 56443, 57073, 57751, 69313, 71353, 72883, 74293, 81883, 82051, 84223
Offset: 1

Views

Author

Derek Orr, Feb 01 2014

Keywords

Comments

Intersection of A236940 and A236071.

Examples

			13 is prime and 13^4-13-1 (28547) and 13^4-13+1 (28549) are twin primes. So, 13 is a member of this sequence.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(90000) | IsPrime(p^4-p-1) and IsPrime(p^4-p+1)]; // Vincenzo Librandi, Feb 14 2014
  • Mathematica
    Select[Prime[Range[10000]], PrimeQ[#^4 - # - 1] && PrimeQ[#^4 - # + 1]&] (* Vincenzo Librandi, Feb 14 2014 *)
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**6) if isprime(n) and isprime(n**4-n-1) and isprime(n**4-n+1)}
    

A236073 Primes p such that p^4 + p + 1 and p^4 - p - 1 are also prime.

Original entry on oeis.org

2, 5, 11, 239, 1871, 4001, 4397, 6971, 12647, 12689, 13337, 13619, 15401, 19391, 19559, 19739, 20201, 20297, 22871, 22937, 28307, 30029, 32561, 36299, 36929, 39569, 44279, 45497, 47441, 48767, 50069, 53897, 55871
Offset: 1

Views

Author

Derek Orr, Jan 19 2014

Keywords

Comments

Primes in the sequence A236072.

Examples

			6971 is prime, 6971^4 - 6971 - 1 is prime, and 6971^4 + 6971 + 1 is prime. So 6971 is a member of this sequence.
		

Crossrefs

Programs

  • PARI
    s=[]; forprime(p=2, 55871, if(isprime(p^4+p+1)&&isprime(p^4-p-1), s=concat(s, p))); s \\ Colin Barker, Jan 19 2014
  • Python
    import sympy
    from sympy import isprime
    {print(p) for p in range(10**5) if isprime(p**4+p+1) and isprime(p**4-p-1) and isprime(p)}
    
Showing 1-3 of 3 results.