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.

A236763 Numbers n such that n^4 - n +/- 1 are twin primes.

Original entry on oeis.org

6, 9, 13, 16, 39, 60, 79, 174, 183, 198, 295, 361, 393, 481, 540, 669, 705, 715, 765, 781, 889, 975, 1078, 1149, 1218, 1260, 1288, 1294, 1351, 1363, 1503, 1600, 1611, 1701, 1713, 1911, 2041, 2254, 2298, 2484, 2553, 2625, 2899, 2946, 2959
Offset: 1

Views

Author

Derek Orr, Jan 30 2014

Keywords

Examples

			975^4-975+1 (903687889651) and 975^4-975-1 (903687889649) are twin primes. Thus, 975 is a member of this sequence.
		

Crossrefs

Intersection of A236761 and A126424.

Programs

  • Mathematica
    Select[Range[3000],AllTrue[#^4-#+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 27 2014 *)
  • PARI
    s=[]; for(n=1, 3000, if(isprime(n^4-n+1)&&isprime(n^4-n-+1), s=concat(s, n))); s \\ Colin Barker, Jan 31 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**4-n+1) and isprime(n**4-n-1)}
    

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

A236766 Numbers n such that n^4 +/- n +/- 1 are prime for all four possibilities.

Original entry on oeis.org

6, 9, 7266, 115131, 380529, 536646, 636609, 818526, 922734, 1389015, 1660119, 2045415, 2085726, 2262420, 2469396, 2722260, 2836374, 2954250, 3146904, 3614226, 3949770, 4062465, 4110834, 4211499, 4400100, 5081055, 5324424, 5434794, 5436090
Offset: 1

Views

Author

Derek Orr, Jan 30 2014

Keywords

Examples

			380529^4+380529+1 (20967711831335262645811), 380529^4+380529-1 (20967711831335262645809), 380529^4-380529+1 (20967711831335261884753), and 380529^4-380529-1 (20967711831335261884751) are all prime. Thus, 380529 is a member of this sequence.
		

Crossrefs

Intersection of A236759, A049408, A236761 and A126424.

Programs

  • Mathematica
    Select[Range[55*10^5],AllTrue[#^4+{(#-1),(#+1),(-#-1),(-#+1)},PrimeQ]&] (* Harvey P. Dale, Nov 02 2024 *)
  • PARI
    for(n=1, 5000000, if(isprime(n^4+n+1)&&isprime(n^4-n+1)&&isprime(n^4+n-1)&&isprime(n^4-n-1), print1(n, ","))) \\ Colin Barker, Jan 31 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**7) if isprime(n**4+n+1) and isprime(n**4-n+1) and isprime(n**4+n-1) and isprime(n**4-n-1)}
    
Showing 1-3 of 3 results.