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-2 of 2 results.

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

Original entry on oeis.org

2, 1049, 1847, 1871, 2129, 2789, 5351, 10709, 11279, 13907, 14321, 17627, 27179, 27809, 29921, 30029, 31859, 37511, 39359, 40559, 40841, 43577, 46091, 46301, 58271, 62207, 62981, 66347, 66947, 68777, 72341, 75617, 79397, 85091, 86579
Offset: 1

Views

Author

Derek Orr, Feb 01 2014

Keywords

Comments

Intersection of A236044 and A236950.

Examples

			2 is prime and 2^4+2+1 (19) and 2^4+2-1 (17) are twin primes. Thus, 2 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[100000]], PrimeQ[#^4 + # - 1] && PrimeQ[#^4 + # + 1]&] (* Vincenzo Librandi, Feb 14 2014 *)
  • Python
    import sympy
    from sympy import isprime
    {print(p) for p in range(10**6) if isprime(p) and isprime(p**4+p+1) and isprime(p**4+p-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-2 of 2 results.