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-10 of 27 results. Next

A125881 Numbers k for which k^3+k^2-1 is prime.

Original entry on oeis.org

2, 4, 5, 6, 9, 11, 12, 14, 19, 22, 25, 26, 27, 29, 32, 34, 36, 37, 40, 44, 47, 49, 55, 60, 62, 64, 65, 69, 70, 71, 81, 82, 84, 89, 95, 97, 106, 107, 114, 119, 121, 125, 127, 132, 139, 140, 141, 144, 147, 155, 159, 161, 165, 172, 174, 179, 184, 190, 201, 204
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Comments

Generating polynomial belongs to the family of irreducible polynomials (or trinomials) of the form x^n+x^(n-1)-1.

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[x^3 + x^2 - 1], Print[x]], {x, 1, 100}]
    Select[Range[250], PrimeQ[#^3 + #^2 - 1] &] (* Harvey P. Dale, Jan 20 2015 *)
  • PARI
    isok(n) = isprime(n^3+n^2-1); \\ Michel Marcus, Nov 08 2013

Extensions

More terms from Michel Marcus, Nov 08 2013

A125885 Numbers k for which k^7+k^6-1 is prime.

Original entry on oeis.org

2, 4, 12, 17, 27, 39, 45, 46, 72, 94, 105, 106, 122, 126, 147, 149, 151, 156, 160, 161, 166, 169, 171, 172, 192, 194, 204, 205, 209, 230, 235, 242, 252, 260, 264, 266, 276, 280, 285, 306, 309, 319, 330, 335, 357, 371, 387, 400, 402, 411, 422, 439, 442, 451, 459
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[x^7 + x^6 - 1], Print[x]], {x, 1, 200}]
  • PARI
    is(n)=isprime(n^7+n^6-1) \\ Charles R Greathouse IV, May 15 2013

Extensions

More terms from Amiram Eldar, Mar 18 2020

A125965 Numbers k for which k^8+k^7-1 is prime.

Original entry on oeis.org

2, 3, 4, 7, 8, 9, 18, 23, 32, 36, 41, 52, 54, 55, 56, 60, 68, 74, 80, 82, 87, 93, 107, 115, 140, 142, 146, 154, 162, 165, 170, 189, 227, 238, 253, 262, 263, 269, 276, 285, 300, 304, 305, 306, 308, 310, 315, 317, 332, 339, 350, 361, 363, 367, 371, 384, 386, 390
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Crossrefs

Programs

A125973 Smallest k such that k^n + k^(n-1) - 1 is prime.

Original entry on oeis.org

2, 2, 2, 2, 2, 3, 2, 2, 14, 4, 7, 2, 38, 6, 7, 3, 4, 10, 2, 9, 74, 6, 10, 7, 4, 61, 20, 4, 5, 9, 6, 16, 6, 8, 2, 9, 4, 10, 2, 48, 44, 163, 9, 2, 95, 3, 27, 70, 6, 26, 57, 9, 6, 8, 207, 2, 27, 15, 45, 7, 69, 199, 55, 16, 2, 5, 12, 43, 137, 39, 9, 57, 5, 20, 4, 115, 2, 103, 45, 15, 20, 109
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Comments

The polynomial x^n + x^(n-1) - 1 is irreducible over the rationals (see Ljunggren link), so the Bunyakovsky conjecture implies that a(n) always exists. - Robert Israel, Nov 16 2016

Examples

			Consider n = 6. k^6 + k^5 - 1 evaluates to 1, 95, 971 for k = 1, 2, 3. Only the last of these numbers is prime, hence a(6) = 3.
		

Crossrefs

Cf. A091997 (n such that a(n)=2).

Programs

  • Maple
    f:= proc(n) local k;
    for k from 2 do if isprime(k^n+k^(n-1)-1) then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 16 2016
  • Mathematica
    a[n_] := For[k = 2, True, k++, If[PrimeQ[k^n + k^(n-1) - 1], Return[k]]];
    Array[a, 100] (* Jean-François Alcover, Feb 26 2019 *)
  • PARI
    {m=82;for(n=1,m,k=1;while(!isprime(k^n+k^(n-1)-1),k++);print1(k,","))} \\ Klaus Brockhaus, Dec 17 2006

Extensions

Edited and extended by Klaus Brockhaus, Dec 17 2006

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

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 18, 20, 24, 34, 46, 50, 56, 58, 70, 72, 78, 84, 92, 108, 112, 116, 142, 146, 150, 168, 172, 176, 178, 186, 188, 190, 204, 230, 238, 240, 242, 244, 252, 270, 276, 284, 286, 296, 304, 310, 328, 342, 350, 352, 354, 370, 378, 384, 388, 400, 406
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(n^3+n^2+n-1)] // Vincenzo Librandi, Nov 23 2010
    
  • Maple
    filter:= k -> isprime(k^3+k^2+k-1):
    select(filter, [1,seq(i,i=2..10000,2)]); # Robert Israel, Oct 07 2019
  • Mathematica
    Do[If[PrimeQ[ -1+n+n^2+n^3],Print[n]],{n,1,300}]
  • PARI
    is(n)=isprime(n^3+n^2+n-1) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

More terms from Vincenzo Librandi, Mar 26 2010

A125882 Numbers k for which k^4+k^3-1 is prime.

Original entry on oeis.org

2, 3, 6, 11, 13, 18, 24, 34, 38, 39, 43, 49, 52, 57, 58, 73, 74, 79, 90, 102, 104, 107, 113, 116, 122, 123, 126, 135, 139, 148, 155, 181, 183, 188, 193, 199, 203, 223, 234, 240, 247, 256, 261, 272, 273, 277, 286, 288, 298, 303, 329, 338, 344, 346, 357, 364, 366
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[x^4 + x^3 - 1], Print[x]], {x, 1, 100}]
  • PARI
    is(n)=isprime(n^4+n^3-1) \\ Charles R Greathouse IV, May 15 2013

Extensions

More terms from Amiram Eldar, Mar 18 2020

A125883 Numbers k for which k^5+k^4-1 is prime.

Original entry on oeis.org

2, 4, 7, 9, 11, 13, 16, 17, 18, 26, 27, 29, 31, 33, 34, 38, 39, 40, 43, 47, 50, 57, 59, 65, 69, 70, 76, 81, 89, 90, 92, 93, 95, 103, 107, 109, 126, 128, 129, 138, 140, 148, 162, 167, 179, 182, 183, 192, 197, 206, 209, 211, 221, 223, 226, 228, 229, 230, 234, 240
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[x^5 + x^4 - 1], Print[x]], {x, 1, 200}]
    Select[Range[200],PrimeQ[#^5+#^4-1]&] (* Harvey P. Dale, Apr 10 2018 *)
  • PARI
    is(n)=isprime(n^5+n^4-1) \\ Charles R Greathouse IV, May 15 2013

Extensions

More terms from Amiram Eldar, Mar 18 2020

A125884 Numbers k for which k^6+k^5-1 is prime.

Original entry on oeis.org

3, 4, 5, 8, 9, 16, 18, 30, 34, 36, 41, 48, 49, 51, 54, 61, 65, 69, 76, 81, 86, 89, 90, 95, 101, 109, 120, 141, 170, 171, 178, 196, 221, 235, 238, 244, 260, 263, 273, 280, 291, 301, 303, 310, 311, 326, 350, 361, 375, 391, 398, 404, 405, 406, 423, 429, 431, 454, 456, 464, 479, 484, 485, 486, 489, 499
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Crossrefs

Programs

  • Maple
    select(t -> isprime(t^6+t^5-1), [$1..1000]); # Robert Israel, Jan 08 2017
  • Mathematica
    Do[If[PrimeQ[x^6 + x^5 - 1], Print[x]], {x, 1, 200}]
  • PARI
    is(n)=isprime(n^6+n^5-1) \\ Charles R Greathouse IV, May 15 2013

Extensions

More terms from Robert Israel, Jan 08 2017

A237615 a(n) = |{0 < k < n: k^2 + k - 1 and pi(k*n) are both prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 2, 1, 2, 1, 3, 2, 1, 4, 1, 3, 4, 4, 2, 4, 3, 6, 2, 2, 2, 3, 7, 4, 3, 4, 5, 6, 1, 3, 2, 3, 9, 3, 3, 4, 7, 5, 8, 5, 2, 2, 5, 5, 4, 5, 6, 4, 5, 6, 10, 6, 6, 10, 9, 9, 10, 12, 2, 8, 7, 3, 6, 6, 4, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) For each n = 4, 5, ..., there is a positive integer k < n with k^2 + k - 1 and pi(k*n) + 1 both prime. Also, for any integer n > 6, there is a positive integer k < n with k^2 + k - 1 and pi(k*n) - 1 both prime.
(iii) For every integer n > 15, there is a positive integer k < n such that pi(k) - 1 and pi(k*n) are both prime.
Note that part (i) is a refinement of the first assertion in the comments in A237578.

Examples

			a(8) = 1 since 4^2 + 4 - 1 = 19 and pi(4*8) = 11 are both prime.
a(33) = 1 since 28^2 + 28 - 1 = 811 and pi(28*33) = 157 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_,n_]:=PrimeQ[k^2+k-1]&&PrimeQ[PrimePi[k*n]]
    a[n_]:=Sum[If[p[k,n],1,0],{k,1,n-1}]
    Table[a[n],{n,1,70}]

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-10 of 27 results. Next