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

A084714 a(n) = smallest prime of the form (2n-1)^k - 2, or 0 if no such number exists.

Original entry on oeis.org

0, 7, 3, 5, 7, 14639, 11, 13, 24137567, 17, 19, 480250763996501976790165756943039, 23, 727, 839, 29, 31, 1223, 1367, 37, 2825759, 41, 43, 2207, 47, 45767944570399, 7890479, 53, 1176246293903439667999, 12117359, 59, 61, 318644812890623
Offset: 1

Views

Author

Amarnath Murthy, Jun 10 2003

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[(2*n - 1)^k - 2], k++ ]; (2*n - 1)^k - 2]; Table[ f[n], {n, 2, 34}]

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 11 2003

A084712 Smallest prime of the form (2n)^k + 1, or 0 if no such number exists.

Original entry on oeis.org

3, 5, 7, 0, 11, 13, 197, 17, 19, 401, 23, 577, 677, 29, 31, 0, 1336337, 37
Offset: 1

Views

Author

Amarnath Murthy, Jun 10 2003

Keywords

Comments

It has not been proved that a(19), a(25), a(31), a(34), a(43) and a(46) are 0; if these values do exist, they have > 4000 digits. The other zeros are definite. - David Wasserman, Jan 03 2005
a((p-1)/2) = p for primes p > 2, or a(n) = 2n+1 for n = (p-1)/2. All other positive a(n) belong to A002496 = primes of form m^2 + 1. Corresponding positive exponents k are powers of 2. They are listed in A079706. - Alexander Adamchuk, Sep 17 2006
Because k must be a power of 2, numbers of the form (2n)^k+1 are called generalized Fermat numbers with base 2n. These numbers, like the regular Fermat numbers, are seldom prime. I checked n=19, 25, 31, 34, 43, 46 with k up to 2^16 without finding any primes. - T. D. Noe, May 13 2008
Comments from N. J. A. Sloane, Jan 27 2024: (Start)
As pointed out by Max Alekseyev, the previous version violated the OEIS rules, since a(19) has not been confirmed. I therefore removed the terms starting at a(19).
The previous DATA line read:
3, 5, 7, 0, 11, 13, 197, 17, 19, 401, 23, 577, 677, 29, 31, 0, 1336337, 37, 0, 41, 43, 197352587024076973231046657, 47, 5308417, 0, 53, 2917, 3137, 59, 61, 0, 0, 67, 0, 71, 73, 5477, 1238846438084943599707227160577, 79, 40960001, 83, 7057, 0, 89
The old b-file has been changed to an a-file.
(End)

Examples

			a(7) = 197 = 14^2 + 1 as 14 + 1 = 15 is not a prime.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1; While[p=1+(2n)^k; k<1024 && !PrimeQ[p], k=2k]; If[k==1024, 0, p], {n,44}] (* T. D. Noe, May 13 2008 *)

Extensions

More terms from David Wasserman, Jan 03 2005
Edited by N. J. A. Sloane, Jan 27 2024 at the suggestion of Max Alekseyev

A255707 Least number k > 0 such that (2*n-1)^k - 2 is prime, or 0 if no such number exists.

Original entry on oeis.org

0, 2, 1, 1, 1, 4, 1, 1, 6, 1, 1, 24, 1, 2, 2, 1, 1, 2, 2, 1, 4, 1, 1, 2, 1, 8, 4, 1, 12, 4, 1, 1, 8, 3, 1, 2, 1, 1, 2, 38, 1, 4, 1, 4, 2, 1, 2, 4, 747, 1, 4, 1, 1, 2, 1, 1, 10, 1, 2, 2, 2, 6, 42, 2, 1, 2, 1, 2, 10, 1, 1, 4, 2, 16, 50, 1, 1, 2, 22, 1, 2, 38
Offset: 1

Views

Author

Robert Price, Mar 02 2015

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {0}; For[n = 2, n ≤ 143, n++, For[k = 1, k >= 1, k++, If[PrimeQ[(2*n - 1)^k - 2], AppendTo[lst, k]; Break[]]]]; lst
  • PARI
    a(n)=if(n==1,return(0));k=1;while(k,if(ispseudoprime((2*n-1)^k-2),return(k));k++)
    vector(50,n,a(n)) \\ Derek Orr, Mar 03 2015

Formula

a(A098090(n)) = 1. - Michel Marcus, Mar 03 2015

A138066 Least k > 0 such that (2n-1)^k + 2 is prime, or 0 if no such number exists.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 11, 0, 1, 1, 0, 2, 1, 0, 1, 1, 0, 1, 113, 0, 1, 7, 0, 1, 1, 0, 3, 1, 0, 1, 1, 0, 12, 1, 0, 1, 3, 0, 1, 255, 0, 8, 1, 0, 1, 1, 0, 1, 1, 0, 1, 3, 0, 2, 15, 0, 2, 1, 0, 1, 23, 0, 1, 1, 0, 4, 3, 0, 1, 1, 0, 3, 1, 0, 136, 1, 0, 1
Offset: 1

Views

Author

Alexander Adamchuk, Mar 02 2008

Keywords

Comments

a(3n+1) = 0 for n > 0.
a(84) > 100000. - Ray Chandler, Aug 10 2011

Crossrefs

Cf. A084713 (smallest prime of the form (2n-1)^k + 2, or 0 if no such number exists).
Cf. A138067 (least k > 1 such that (2n-1)^k + 2 is prime, or 0 if no such number exists).
Cf. A051783 (k such that 3^k + 2 is prime).
Cf. A087885 (k such that 5^k + 2 is prime).

A250200 Least number k>1 such that (2n-1)^k - 2 is prime, or 0 if no such number exists.

Original entry on oeis.org

0, 2, 2, 2, 2, 4, 2, 2, 6, 2, 2, 24, 7, 2, 2, 3, 2, 2, 2, 4, 4, 2, 11, 2, 2, 8, 4, 2, 12, 4, 2, 2, 8, 3, 2, 2, 4, 2, 2, 38, 130, 4, 4, 4, 2, 3, 2, 4, 747, 3, 4, 2, 10, 2, 3, 17, 10, 13, 2, 2, 2, 6, 42, 2, 3, 2, 6, 2, 10, 2, 4, 4, 2, 16, 50, 3, 9, 2, 22, 25
Offset: 1

Views

Author

Robert Price, Mar 02 2015

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {0}; For[n = 2, n ≤ 143, n++, For[k = 2, k >= 1, k++, If[PrimeQ[(2*n - 1)^k - 2], AppendTo[lst, k]; Break[]]]]; lst
    lnk[n_]:=Module[{k=2,c=2n-1},While[!PrimeQ[c^k-2],k++];k]; Join[{0}, Array[ lnk,80,2]] (* Harvey P. Dale, Jul 24 2017 *)

A138067 Least k > 1 such that (2n-1)^k + 2 is prime, or 0 if no such number exists.

Original entry on oeis.org

2, 2, 3, 0, 2, 5, 0, 2, 105, 0, 2, 11, 0, 5, 3, 0, 2, 15, 0, 2, 9, 0, 2, 113, 0, 5, 7, 0, 2, 27, 0, 3, 3, 0, 3, 3, 0, 12, 61, 0, 2, 3, 0, 4, 255, 0, 8, 63, 0, 2, 9, 0, 2, 3473, 0, 2, 3, 0, 2, 15, 0, 2, 87, 0, 3, 23, 0, 36, 1861, 0, 4, 3, 0, 2, 5, 0, 3, 7, 0, 136, 425, 0, 11
Offset: 1

Views

Author

Alexander Adamchuk, Mar 02 2008

Keywords

Comments

a(3n+1) = 0 for n > 0.
a(84) > 100000. - Ray Chandler, Aug 10 2011

Crossrefs

Cf. A084713 (smallest prime of the form (2n-1)^k + 2, or 0 if no such number exists).
Cf. A138066 (least k > 0 such that (2n-1)^k + 2 is prime, or 0 if no such number exists).
Cf. A051783 (k such that 3^k + 2 is prime).
Cf. A087885 (k such that 5^k + 2 is prime).

Extensions

a(54)-a(83) from Donovan Johnson, Oct 29 2008
Showing 1-6 of 6 results.