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

A156018 Primes of the form k^3 + k^2 + k - 1.

Original entry on oeis.org

2, 13, 83, 257, 1109, 2953, 6173, 8419, 14423, 40493, 99497, 127549, 178807, 198533, 347969, 378503, 480713, 599843, 787243, 1271483, 1417583, 1574467, 2883593, 3133597, 3397649, 4770023, 5118203, 5482927, 5671613, 6469637, 6680203
Offset: 1

Views

Author

Keywords

Examples

			13 is a term since 13 = 2^3 + 2^2 + 2 - 1.
		

Crossrefs

Cf. A125964.

Programs

  • Mathematica
    lst={};Do[p=(n^1+n^2+n^3)-1;If[PrimeQ[p],AppendTo[lst,p]],{n,7!}];lst

A156021 Numbers k such that k^1 + k^2 + k^3 + k^4 -+ 1 are twin primes.

Original entry on oeis.org

1, 2, 12, 30, 44, 50, 63, 74, 110, 165, 177, 222, 239, 254, 327, 492, 519, 804, 942, 954, 1007, 1343, 1352, 1520, 1770, 2375, 2450, 2658, 2795, 2945, 2994, 3075, 3332, 3527, 3548, 3803, 3915, 3935, 4025, 4653, 4704, 4785, 4808, 4862, 5270, 5310, 5364, 5370
Offset: 1

Views

Author

Keywords

Examples

			2 is a term since 2 + 2^2 + 2^3 + 2^4 - 1 = 29 and 2 + 2^2 + 2^3 + 2^4 + 1 = 31 are twin primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..6*10^3] | IsPrime(n^4+n^3+n^2+n-1) and IsPrime(n^4+n^3+n^2+n+1)]; // Vincenzo Librandi, Dec 26 2015
  • Mathematica
    lst={};Do[p=(n^1+n^2+n^3+n^4);If[PrimeQ[p-1]&&PrimeQ[p+1],AppendTo[lst,n]],{n,8!}];lst

A156026 Lesser of twin primes of the form k^1 + k^2 + k^3 + k^4 - 1.

Original entry on oeis.org

3, 29, 22619, 837929, 3835259, 6377549, 16007039, 30397349, 147753209, 745720139, 987082979, 2439903209, 3276517919, 4178766089, 11468884079, 58714318139, 72695416559, 418374010739, 788251653689, 829180295189
Offset: 1

Views

Author

Keywords

Comments

The corresponding values of k are 1, 2, 12, 30, 44, ... (A156021).

Examples

			29 is a term since 2 + 2^2 + 2^3 + 2^4 - 1 = 29 and 2 + 2^2 + 2^3 + 2^4 + 1 = 31 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=(n^1+n^2+n^3+n^4);If[PrimeQ[p1=p-1]&&PrimeQ[p2=p+1],AppendTo[lst,p1]],{n,8!}];lst
    Select[Table[n+n^2+n^3+n^4-1,{n,1000}],AllTrue[{#,#+2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 17 2019 *)

A156027 Greater of twin primes pairs of the form k^1 + k^2 + k^3 + k^4 - 1.

Original entry on oeis.org

5, 31, 22621, 837931, 3835261, 6377551, 16007041, 30397351, 147753211, 745720141, 987082981, 2439903211, 3276517921, 4178766091, 11468884081, 58714318141, 72695416561, 418374010741, 788251653691, 829180295191, 1029317536801, 3255573820801, 3343706188681
Offset: 1

Views

Author

Keywords

Comments

The corresponding values of k: 1, 2, 12, 30, 44, 50, 63, 74, 110, 165, 177, 222, 239, 254, 327, 492, 519, 804, 942, 954,...

Examples

			2 + 2^2 + 2^3 + 2^4 - 1 = 29 and 2 + 2^2 + 2^3 + 2^4 + 1 = 31.
		

Crossrefs

Programs

  • Magma
    [p+2:k in [1..1500] | IsPrime(p) and IsPrime(p+2) where p is k^1+k^2+k^3+k^4-1]; // Marius A. Burtea, Dec 21 2019
  • Mathematica
    lst={};Do[p=(n^1+n^2+n^3+n^4);If[PrimeQ[p1=p-1]&&PrimeQ[p2=p+1],AppendTo[lst,p2]],{n,8!}];lst

Extensions

More terms from Amiram Eldar, Dec 21 2019

A265670 Numbers n such that n^5 + n^4 + n^3 + n^2 + n - 1 is prime.

Original entry on oeis.org

2, 8, 10, 12, 16, 18, 22, 24, 28, 32, 42, 50, 60, 68, 70, 78, 88, 104, 108, 118, 132, 138, 206, 238, 240, 242, 270, 282, 300, 306, 312, 318, 338, 372, 376, 382, 390, 394, 398, 418, 440, 452, 464, 512, 522, 532, 534, 548, 566, 586, 594, 626, 630, 636, 640, 650
Offset: 1

Views

Author

Vincenzo Librandi, Dec 13 2015

Keywords

Comments

All terms are even. - Altug Alkan, Dec 13 2015

Examples

			2 is in the sequence because 2^5 + 2^4 + 2^3 + 2^2 + 2 - 1 = 61 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..700] | IsPrime(s) where s is n^5+n^4+n^3+n^2+n-1];
    
  • Mathematica
    Select[Range[700], PrimeQ[Total[#^Range[1, 5, 1]] - 1] &]
  • PARI
    print1(2, ", "); forcomposite(n=1, 1e4, if(ispseudoprime(n^5 + n^4 + n^3 + n^2 + n - 1), print1(n, ", "))) \\ Altug Alkan, Dec 13 2015
Showing 1-5 of 5 results.