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

A162293 Numbers k such that k^2*(k-1)-1 is prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 12, 13, 18, 21, 22, 30, 33, 46, 48, 57, 58, 61, 66, 67, 75, 79, 85, 87, 90, 94, 96, 99, 100, 106, 111, 114, 117, 118, 120, 121, 127, 129, 133, 138, 144, 153, 160, 162, 171, 174, 175, 186, 187, 195, 199, 202, 204, 220, 222, 223, 231, 243, 246, 252
Offset: 1

Views

Author

Keywords

Examples

			a(1)=2 since 2^3-2^2-1=3 is prime.
a(2)=3 since 3^3-3^2-1=17 is prime.
a(3)=4 since 4^3-4^2-1=47 is prime.
		

Crossrefs

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

Programs

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

Formula

a(n)^2 * ( a(n)-1 )-1 = A162291(n).

Extensions

Comments moved to the examples by R. J. Mathar, Sep 11 2009

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

A154686 Numbers k such that k^3 + 2*k^2 + k + 1 is prime.

Original entry on oeis.org

1, 2, 4, 5, 7, 12, 13, 20, 23, 25, 27, 28, 32, 33, 34, 35, 39, 42, 44, 47, 48, 49, 50, 54, 57, 75, 79, 82, 88, 89, 92, 95, 98, 99, 100, 103, 109, 110, 114, 117, 119, 120, 123, 132, 134, 137, 139, 147, 148, 160, 169, 172, 180, 189, 190, 193, 194, 200, 202, 203, 204, 205
Offset: 1

Views

Author

Vincenzo Librandi, Jan 19 2009

Keywords

Comments

One less than the entry in A111501. - R. J. Mathar, Jan 05 2011

Crossrefs

Cf. A111501, A162292 (associated primes).

Programs

A162292 Primes of the form k^3-k^2+1, k>0.

Original entry on oeis.org

5, 19, 101, 181, 449, 2029, 2549, 8821, 13249, 16901, 21169, 23549, 34849, 38149, 41651, 45361, 62401, 77659, 89101, 108289, 115249, 122501, 130051, 163351, 191749, 433201, 505601, 564899, 697049, 720901, 795709, 875521, 960499, 990001
Offset: 1

Views

Author

Keywords

Examples

			a(1)=2^3-2^2+1=5. a(2)=3^3-3^2+1=19. a(3)=5^3-5^2+1=101.
		

Crossrefs

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

Programs

  • Mathematica
    lst={};Do[s=n^3-n^2;If[PrimeQ[s+1],AppendTo[lst,s+1]],{n,4*5!}];lst

Formula

a(n)= A111501(n)^3-A111501(n)^2+1 .

Extensions

Edited by R. J. Mathar, Jul 02 2009

A239135 Numbers k such that (k-1)*k^2 + 1 and k^2 + (k-1) are both prime.

Original entry on oeis.org

2, 3, 5, 6, 8, 13, 21, 24, 26, 28, 35, 45, 48, 50, 55, 76, 83, 89, 93, 96, 100, 101, 115, 120, 138, 140, 148, 149, 181, 191, 195, 203, 206, 209, 215, 230, 258, 259, 281, 285, 294, 301, 309, 323, 330, 349, 358, 373, 380, 386, 393, 395, 423, 428, 433, 474, 495
Offset: 1

Views

Author

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

Keywords

Comments

Numbers k such that (k^3 - k^2 + 1)*(k^2 + k - 1) is semiprime.
Intersection of A045546 and A111501.
Primes in this sequence: 2, 3, 5, 13, 83, 89, 101, 149, 181, 191, ...

Examples

			2 is in this sequence because (2-1)*2^2+1=5 and 2^2+(2-1)=5 are both prime.
		

Crossrefs

Cf. A239115.

Programs

  • Magma
    k := 1;
         for n in [1..10000] do
            if IsPrime(k*(n - 1)*n^2 + 1) and IsPrime(k*n^2 + n - 1) then
               n;
            end if;
         end for;
  • Mathematica
    Select[Range[600],PrimeQ[#^2+#-1]&&PrimeQ[#^2(#-1)+1]&] (* Farideh Firoozbakht, Mar 17 2014 *)
Showing 1-7 of 7 results.