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

A100698 Primes of the form k^3 - k + 1.

Original entry on oeis.org

7, 61, 211, 337, 991, 1321, 2731, 3361, 6841, 9241, 10627, 15601, 17551, 29761, 42841, 59281, 68881, 74047, 91081, 124951, 140557, 157411, 185137, 238267, 421801, 456457, 592621, 614041, 658417, 728911, 778597, 857281, 970201, 1030201, 1061107, 1190911, 1367521
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 09 2004

Keywords

Crossrefs

Programs

  • Magma
    [ a: n in [0..400] | IsPrime(a) where a is n^3 - n +1]; // Vincenzo Librandi, Nov 17 2010
  • Mathematica
    Select[Table[n^3-n+1,{n,0, 1500}],PrimeQ] (* Vincenzo Librandi, Jul 18 2012 *)

Formula

a(n) = A061600(A236477(n)). - Elmo R. Oliveira, Apr 19 2025

Extensions

Inaccurate comment removed by D. S. McNeil, Nov 17 2010

A158295 Primes p such that p^3-p-+1 are twin primes.

Original entry on oeis.org

2, 11, 31, 41, 239, 521, 2309, 4099, 4409, 4441, 4651, 5009, 5039, 5261, 6481, 6871, 7129, 8609, 9391, 10259, 12841, 13759, 14519, 14879, 14939, 15569, 16871, 18451, 20369, 22441, 24049, 25841, 28151, 28279, 29429, 30181, 30631, 32089, 32299, 36781
Offset: 1

Views

Author

Keywords

Comments

Primes p such that p^3+p-+1 are twin primes, so far only one: 3. 3^3+3=30-+1 = primes.
Primes in the sequence A236524. Odd primes are congruent to either 1 mod 10 or 9 mod 10. - Derek Orr, Jan 27 2014

Examples

			2^3-2=6-+1 = 5,7 primes, 11^3-11-+1 = 1319,1321 primes...
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];a=p^3-p;If[PrimeQ[a-1]&&PrimeQ[a+1],AppendTo[lst,p]],{n,8!}];lst
    Select[Prime[Range[3500]],And@@PrimeQ[#^3-#+{1,-1}]&] (* Harvey P. Dale, Jan 05 2013 *)
  • PARI
    s=[]; forprime(p=2, 40000, if(isprime(p^3-p-1) && isprime(p^3-p+1), s=concat(s, p))); s /* Colin Barker, Jan 28 2014 */
  • Python
    import sympy
    from sympy import isprime
    {print(p) for p in range(10**5) if isprime(p) and isprime(p**3-p-1) and isprime(p**3-p+1)} # Derek Orr, Jan 27 2014
    

A236478 Primes p such that p^3 - p + 1 is prime.

Original entry on oeis.org

2, 7, 11, 19, 31, 41, 101, 139, 167, 239, 271, 277, 307, 347, 419, 449, 479, 491, 521, 547, 557, 587, 617, 619, 631, 647, 739, 757, 761, 769, 787, 809, 827, 839, 857, 971, 977, 991, 1019, 1069, 1187, 1201, 1217, 1231, 1277, 1487, 1621, 1637, 1709, 1747, 1861
Offset: 1

Views

Author

Derek Orr, Jan 26 2014

Keywords

Comments

Primes in the sequence A236477.

Examples

			419 is prime and 419^3 - 419 + 1 = 73559641 is prime. So 419 is a member of this sequence.
		

Crossrefs

Cf. A236477.

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[#^3-#+1]&] (* Harvey P. Dale, Oct 30 2021 *)
  • PARI
    s=[]; forprime(p=2, 2000, if(isprime(p^3-p+1), s=concat(s, p))); s \\ Colin Barker, Jan 27 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n) and isprime(n**3-n+1)}
    

Extensions

More terms from Colin Barker, Jan 27 2014

A236524 Numbers n such that n^3 - n +/- 1 are twin primes.

Original entry on oeis.org

2, 4, 11, 14, 15, 21, 31, 35, 41, 45, 111, 130, 136, 140, 155, 176, 189, 221, 230, 239, 274, 316, 406, 414, 441, 465, 466, 504, 521, 561, 570, 580, 584, 591, 686, 689, 696, 759, 834, 836, 860, 869, 904, 960, 1026, 1159, 1379, 1539, 1614, 1625, 1660
Offset: 1

Views

Author

Derek Orr, Jan 27 2014

Keywords

Examples

			561^3 - 561 + 1 (176557921) and 561^3 - 561 - 1 (176557919) are twin primes. Thus, 561 is a member of this sequence.
		

Crossrefs

Intersection of A126421 and A236477.

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(n^3-n-1) and IsPrime(n^3-n+1)]; // Vincenzo Librandi, Jan 30 2018
  • Mathematica
    Select[Range[2000], PrimeQ[#^3 - # - 1] && PrimeQ[#^3 - # + 1] &] (* Vincenzo Librandi, Jan 30 2018 *)
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**3-n-1) and isprime(n**3-n+1)}
    

A236764 Numbers k such that k^3 +/- k +/- 1 are prime for all four possibilities.

Original entry on oeis.org

15, 21, 15375, 25164, 53361, 95190, 110685, 115140, 133701, 139425, 140430, 140844, 189336, 217686, 220650, 266916, 272469, 289341, 344880, 364665, 377805, 382221, 390270, 415779, 454905, 539700, 561186, 567645, 575799, 584430, 603651, 722484
Offset: 1

Views

Author

Derek Orr, Jan 30 2014

Keywords

Examples

			110685^3+110685+1 (1356020665779811), 110685^3+110685-1 (1356020665779809), 110685^3-110685+1 (1356020665558441) and 110685^3-110685-1 (1356020665558439) are all prime. Thus 110685 is a member of this sequence.
		

Crossrefs

Intersection of A126421, A236477, A049407, and A236475.

Programs

  • PARI
    for(n=1, 800000, if(isprime(n^3+n+1)&&isprime(n^3-n+1)&&isprime(n^3+n-1)&&isprime(n^3-n-1), print1(n, ","))) \\ Colin Barker, Jan 31 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**6) if isprime(n**3+n+1) and isprime(n**3-n+1) and isprime(n**3+n-1) and isprime(n**3-n-1)}
    

A258185 Primes p such that p^2 - q + 1 is prime, where p, q are consecutive primes and p

Original entry on oeis.org

2, 3, 5, 11, 17, 29, 71, 101, 149, 197, 269, 419, 523, 599, 617, 641, 683, 761, 857, 997, 1061, 1063, 1091, 1151, 1201, 1277, 1289, 1409, 1531, 1571, 1607, 1753, 1789, 1987, 2027, 2039, 2111, 2129, 2161, 2267, 2309, 2339, 2503, 2687, 2753, 2999, 3049, 3067, 3257
Offset: 1

Views

Author

K. D. Bajpai, May 23 2015

Keywords

Examples

			a(4) = 11 is prime: 13 is next prime. 11^2 - 13 + 1 = 109 which is also prime.
a(5) = 17 is prime: 19 is next prime. 17^2 - 19 + 1 = 271 which is also prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10^4] | IsPrime(n) and IsPrime(n^2 - NextPrime(n) +1)]; // Vincenzo Librandi, May 23 2015
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[#^2 - NextPrime[#] + 1] &]
    Select[Partition[Prime[Range[500]],2,1],PrimeQ[#[[1]]^2-#[[2]]+1]&][[All,1]] (* Harvey P. Dale, Sep 06 2016 *)
  • PARI
    c=0; forprime(p = 1,1e6, if(isprime(p^2 - nextprime(p+1) + 1), c++; print(c,"  ",p)))
    

Extensions

Definition clarified by Harvey P. Dale, Sep 06 2016
Showing 1-6 of 6 results.