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.

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

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

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

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.