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

A119591 Least k such that 2*n^k - 1 is prime.

Original entry on oeis.org

1, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 1, 2, 2, 1, 10, 1, 1, 6, 1, 2, 6, 1, 2, 136, 1, 1, 6, 6, 1, 6, 1, 1, 2, 2, 1, 2, 1, 2, 4, 1, 2, 4, 4, 1, 2, 1, 1, 44, 1, 1, 2, 1, 3, 2, 5, 3, 2, 2, 1, 4, 1, 768, 4, 1, 1, 52, 34, 2, 132, 1, 1, 14, 7, 1, 2, 2, 1, 8, 1, 2, 10, 1, 24, 60, 1, 1, 2, 3, 5, 2, 1, 1, 2, 1, 1
Offset: 2

Views

Author

Pierre CAMI, Jun 01 2006

Keywords

Comments

From Eric Chen, Jun 01 2015: (Start)
Conjecture: a(n) is defined for all n.
a(303) > 10000, a(304)..a(360) = {1, 2, 11, 1, 990, 1, 1, 2, 2, 4, 74, 5, 1, 10, 6, 6, 4, 1, 1, 2, 1, 9, 12, 1, 80, 2, 1, 1, 2, 14, 3, 2, 3, 1, 12, 1, 60, 36, 1, 8, 4, 34, 1, 522, 3, 15, 14, 1, 6, 2, 3, 1, 4, 5, 4, 10, 1}.
a(n) = 1 if and only if n is in A006254. (End)
From Eric Chen, Sep 16 2021: (Start)
Now a(303) is known to be 40174, also other terms > 10000: a(383) = 20956, a(515) = 58466, a(522) = 62288, a(578) = 129468, a(581) > 400000, a(590) = 15526, a(647) = 21576, a(662) = 16590, a(698) = 127558, a(704) = 62034, see the a-file and the references.
a(n) = 2 if and only if n is in A066049 but not in A006254.
a(n) = 3 if and only if n is in A214289 but not in A006254 or A066049. (End)

Crossrefs

Numbers r such that 2*k^r-1 is prime: A090748 (k=2), A003307 (k=3), A146768 (k=4), A120375 (k=5), A057472 (k=6), A002959 (k=7), ... (k=8), ... (k=9), A002957 (k=10), A120378 (k=11), ... (k=12), A174153 (k=13), A273517 (k=14), ... (k=15), ... (k=16), A193177 (k=17), A002958 (k=25).

Programs

  • Mathematica
    f[n_] := Block[{k = 0}, While[ ! PrimeQ[2*n^k - 1], k++ ]; k ]; Table[f[n], {n, 2, 106}] (* Ray Chandler, Jun 08 2006 *)
  • PARI
    a(n) = for(k=1, 2^24, if(ispseudoprime(2*n^k-1), return(k))) \\ Eric Chen, Jun 01 2015

Formula

From Eric Chen, Sep 16 2021: (Start)
a(6*n) = A098873(n).
a(2^n) = A279095(n).
a(A006254(n)) = 1.
a(A066049(n)) <= 2.
a(A214289(n)) <= 3. (End)

Extensions

Corrected and extended by Ray Chandler, Jun 08 2006

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)).
Showing 1-2 of 2 results.