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

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

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 *)

A253178 Least k>=1 such that 2*A007494(n)^k+1 is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 47, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, 2729, 1, 1, 2, 1, 2, 175, 1, 1, 1, 1, 1, 1, 3, 3, 3, 43, 1, 1, 2, 1, 1, 3, 2, 1, 1, 3, 1, 11, 1, 1, 4, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 192275, 2, 1233, 1, 3, 5, 51, 1, 1, 1, 1, 286, 1, 1, 755, 2, 1, 4, 1, 6, 1, 2
Offset: 1

Views

Author

Eric Chen, Mar 20 2015

Keywords

Comments

If n == 1 (mod 3), then for every positive integer k, 2*n^k+1 is divisible by 3 and cannot be prime (unless n=1). Thus we restrict the domain of this sequence to A007494 (n which is not in the form 3j+1).
Conjecture: a(n) is defined for all n.
a(145) > 200000, a(146) .. a(156) = {1, 1, 66, 1, 4, 3, 1, 1, 1, 1, 6}, a(157) > 100000, a(158) .. a(180) = {2, 1, 2, 11, 1, 1, 3, 321, 1, 1, 3, 1, 2, 12183, 5, 1, 1, 957, 2, 3, 16, 3, 1}.
a(n) = 1 if and only if n is in A144769.

Crossrefs

Programs

  • Mathematica
    A007494[n_] := 2n - Floor[n/2];
    Table[k=1; While[!PrimeQ[2*A007494[n]^k+1], k++]; k, {n, 1, 144}]
  • PARI
    a007494(n) = n+(n+1)>>1;
    a(n) = for(k=1, 2^24, if(ispseudoprime(2*a007494(n)^k+1),return(k)));

Formula

a(n) = A119624(A007494(n)).

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