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.

A162291 Primes of the form n^3-n^2-1.

Original entry on oeis.org

3, 17, 47, 179, 293, 647, 1583, 2027, 5507, 8819, 10163, 26099, 34847, 95219, 108287, 181943, 191747, 223259, 283139, 296273, 416249, 486797, 606899, 650933, 720899, 821747, 875519, 960497, 989999, 1179779, 1355309, 1468547, 1587923, 1629107
Offset: 1

Views

Author

Keywords

Comments

Generated by the n of A162293.

Crossrefs

Cf. A087908, A162293 (corresponding n).

Programs

  • Mathematica
    Select[Table[n^3-n^2-1,{n,0,250}],PrimeQ] (* Harvey P. Dale, Dec 08 2013 *)

Formula

A087908 INTERSECT A000040 - R. J. Mathar, Jul 31 2007

Extensions

Comment abbreviated by R. J. Mathar, Jul 31 2007

A111503 Numbers k such that k^3 - k^2 - 1 and k^3 - k^2 + 1 are twin primes.

Original entry on oeis.org

2, 3, 6, 13, 21, 33, 48, 58, 90, 96, 99, 100, 111, 118, 120, 121, 133, 138, 195, 204, 279, 334, 348, 366, 393, 400, 465, 525, 541, 565, 594, 721, 736, 789, 855, 859, 925, 946, 1044, 1099, 1239, 1279, 1323, 1410, 1459, 1470, 1513, 1521, 1524, 1629, 1630, 1638
Offset: 1

Views

Author

Pierre CAMI, Nov 16 2005

Keywords

Comments

Intersection of A111501 and A162293. - Ivan Neretin, Aug 24 2016

Examples

			2^3 - 2^2 - 1 = 3, 2^3 - 2^2 + 1 = 5, 3 and 5 are twin primes, so 2 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..100000] |IsPrime(n^3-n^2-1) and IsPrime(n^3-n^2+1)]; // Vincenzo Librandi, Nov 13 2010
    
  • Mathematica
    lst={}; Do[If[PrimeQ[n^3-n^2-1]&&PrimeQ[n^3-n^2+1], AppendTo[lst, n]], {n, 10^3}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 08 2008 *)
    tpQ[n_]:=Module[{c=n^3-n^2},And@@PrimeQ[{c+1,c-1}]]; Select[Range[ 1700],tpQ] (* Harvey P. Dale, Aug 27 2012 *)
  • PARI
    isok(n) = isprime(n^3 - n^2 - 1) && isprime(n^3 - n^2 + 1); \\ Michel Marcus, Aug 24 2016

A162294 Numbers k such that k^3-k^2-k-1 is prime.

Original entry on oeis.org

4, 6, 8, 12, 16, 22, 28, 34, 44, 50, 54, 56, 58, 76, 78, 88, 110, 112, 118, 134, 138, 156, 162, 166, 168, 170, 188, 190, 200, 204, 208, 210, 226, 230, 236, 244, 250, 268, 274, 302, 310, 314, 322, 324, 340, 344, 356, 364, 368, 378, 382, 390, 398, 400, 420, 424
Offset: 1

Views

Author

Keywords

Examples

			k=4 is in the sequence because 4^3-4^2-4-1=43 is prime.
k=6 is in the sequence because 6^3-6^2-6-1=173 is prime.
		

Crossrefs

Cf. A087908, A111501, A162291, A162293, A162295 (corresponding primes).

Programs

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

Formula

k^3-k^2-k-1 = A162295(n), where k=a(n).
Sum_{i=1..n} a(i) = Sum_{i=1..n} i * ( pi(i^3 - i^2 - i - 1) - pi(i^3 - i^2 - i - 2) ). - Wesley Ivan Hurt, May 24 2013

Extensions

Edited by R. J. Mathar, Jul 02 2009

A162295 Primes of the form k^3-k^2-k-1.

Original entry on oeis.org

43, 173, 439, 1571, 3823, 10141, 21139, 38113, 83203, 122449, 154493, 172423, 191689, 433123, 468389, 673639, 1318789, 1392271, 1628989, 2388013, 2608889, 3771923, 4225121, 4546573, 4713239, 4883929, 6609139, 6822709, 7959799
Offset: 1

Views

Author

Keywords

Examples

			a(1)=4^3-4^2-4-1=43. a(2)=6^3-6^2-6-1=173.
		

Crossrefs

Cf. A087908, A162291, A111501, A162293, A162294, A162294 (corresponding k).

Programs

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

Formula

a(n)=k^3-k^2-k-1 where k=A162294(n).

Extensions

Edited by R. J. Mathar, Jul 02 2009

A239115 Numbers n such that (n-1)*n^2-1 and n^2-(n-1) are both prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 13, 18, 21, 22, 58, 67, 79, 90, 100, 106, 111, 118, 120, 144, 162, 174, 195, 204, 246, 273, 279, 345, 393, 403, 406, 435, 436, 526, 541, 567, 613, 625, 636, 702, 721, 729, 736, 744, 762, 763, 865, 898, 961, 970, 993, 1059, 1099, 1117, 1131
Offset: 1

Views

Author

Ilya Lopatin following a suggestion from Juri-Stepan Gerasimov, Mar 10 2014,

Keywords

Comments

Numbers n such that (n^3-n^2-1)*(n^2-n+1) is semiprime.
Intersection of A162293 and A055494.
Primes in this sequence: 2, 3, 7, 13, 67, 79, 541, 613, 1117, ...
Squares in this sequence: 4, 9, 100, 144, 961, ...

Examples

			13 is in this sequence because (13-1)*13^2-1 = 2027 and 13^2-(13-1) = 157 are both prime.
		

Crossrefs

Programs

  • Magma
    k:=1;
        for n in [1..1000] do
         if IsPrime(k*(n-1)*n^2-1) and IsPrime(k*n^2-n+1) then
                n;
          end if;
        end for; // Juri-Stepan Gerasimov, Mar 18 2014
  • Mathematica
    Select[Range[1000], PrimeQ[#^3 - #^2 - 1] && PrimeQ[#^2 - # + 1] &] (* Giovanni Resta, Mar 10 2014 *)
    Select[Range[1200],PrimeOmega[#^5-2#^4+2#^3-2#^2+#-1]==2&] (* Harvey P. Dale, Sep 24 2014 *)
  • PARI
    isok(n) = isprime(n^3-n^2-1) && isprime(n^2-n+1); \\ Michel Marcus, Mar 10 2014
    

Extensions

More terms from Giovanni Resta, Mar 10 2014
Showing 1-5 of 5 results.