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.

A029810 Erroneous version of A033809, A046067.

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 2, 1, 3, 6, 1, 1, 2, 2, 1, 8, 1, 1, 2, 1, 1, 2, 2, 583, 2, 1, 1, 4, 2, 5, 4, 1
Offset: 1

Views

Author

Keywords

A040076 Smallest m >= 0 such that n*2^m + 1 is prime, or -1 if no such m exists.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 3, 0, 6, 1, 1, 0, 1, 2, 2, 1, 2, 0, 1, 0, 8, 3, 1, 2, 1, 0, 2, 5, 1, 0, 1, 0, 2, 1, 2, 0, 583, 1, 2, 1, 1, 0, 1, 1, 4, 1, 2, 0, 5, 0, 4, 7, 1, 2, 1, 0, 2, 1, 1, 0, 3, 0, 2, 1, 1, 4, 3, 0, 2, 3, 1, 0, 1, 2, 4, 1, 2, 0, 1, 1, 8, 7, 2, 582, 1, 0, 2, 1, 1, 0, 3, 0
Offset: 1

Views

Author

Keywords

Comments

Sierpiński showed that a(n) = -1 infinitely often. John Selfridge showed that a(78557) = -1 and it is conjectured that a(n) >= 0 for all n < 78557.
Determining a(131072) = a(2^17) is equivalent to finding the next Fermat prime after F_4 = 2^16 + 1. - Jeppe Stig Nielsen, Jul 27 2019

Examples

			1*(2^0)+1=2 is prime, so a(1)=0;
3*(2^1)+1=5 is prime, so a(3)=1;
For n=7, 7+1 and 7*2+1 are composite, but 7*2^2+1=29 is prime, so a(7)=2.
		

Crossrefs

For the corresponding primes see A050921.
Cf. A033809, A046067 (odd n), A057192 (prime n).

Programs

  • Mathematica
    Do[m = 0; While[ !PrimeQ[n*2^m + 1], m++ ]; Print[m], {n, 1, 110} ]
    sm[n_]:=Module[{k=0},While[!PrimeQ[n 2^k+1],k++];k]; Array[sm,120] (* Harvey P. Dale, Feb 05 2020 *)

A046067 Smallest m such that (2n-1)2^m+1 is prime, or -1 if no such value exists.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 2, 1, 3, 6, 1, 1, 2, 2, 1, 8, 1, 1, 2, 1, 1, 2, 2, 583, 2, 1, 1, 4, 2, 5, 4, 1, 1, 2, 1, 3, 2, 1, 3, 2, 1, 1, 4, 2, 1, 8, 2, 1, 2, 1, 3, 16, 1, 3, 6, 1, 1, 2, 3, 1, 8, 6, 1, 2, 3, 1, 4, 1, 3, 2, 1, 53, 6, 8, 3, 4, 1, 1, 8, 6, 3, 2, 1, 7, 2, 8, 1, 2, 2, 1, 4, 1, 3, 6, 1, 1, 2, 4, 15, 2
Offset: 1

Views

Author

Keywords

Comments

There exist odd integers 2k-1 such that (2k-1)2^n+1 is always composite.
The smallest known example is 78557. Therefore a(39279) = -1.
For the corresponding primes see A057025(n-1), n >= 1, where a 0 will show up if a(n) = -1. - Wolfdieter Lang, Feb 07 2013.
Jaeschke shows that every positive integer appears infinitely often. - Jeppe Stig Nielsen, Jul 06 2020

References

  • Ribenboim, P. The New Book of Prime Number Records. New York: Springer-Verlag, pp. 357-359, 1996.

Crossrefs

Cf. A046068.
Bisection of A040076. Cf. A033809.

Programs

  • Mathematica
    max = 10000 (* this maximum value of m is sufficient up to n = 1000 *); a[n_] := For[m = 1, m <= max, m++, If[PrimeQ[(2n - 1)*2^m + 1], Return[m]]] /. Null -> -1; a[1] = 0; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 08 2012 *)

A250204 Sierpiński problem in base 6: Least k > 0 such that n*6^k+1 is prime, or 0 if no such k exists.

Original entry on oeis.org

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

Views

Author

Eric Chen, Mar 11 2015

Keywords

Comments

a(5k+4) = 0, since (5k+4)*6^n+1 is always divisible by 5, but there are infinitely many numbers not in the form 5k+4 such that a(n) = 0. For example, a(174308) = 0 since 174308*6^n+1 is always divisible by 7, 13, 31, 37, or 97 (See A123159). Conjecture: if n is not in the form 5k+4 and n < 174308, then a(n) > 0.
However, according to the Barnes link no primes n*6^k+1 are known for n = 1296, 7776 and 46656, so these may be counterexamples. - Robert Israel, Mar 17 2015

Crossrefs

Cf. A250205 (Least k > 0 such that n*6^k-1 is prime).

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N), using k up to 10000
    a[1]:= 1:
    for n from 2 to N do
      if n mod 5 = 4 then a[n]:= 0
      else
        for k from 1 to 10000 do
        if isprime(n*6^k+1) then
           a[n]:= k;
           break
        fi
        od
      fi
    od:
    L:= [seq(a[n],n=1..N)]; # Robert Israel, Mar 17 2015
  • Mathematica
    (* m <= 10000 is sufficient up to n = 1000 *)
    a[n_] := For[k = 1, k <= 10000, k++, If[PrimeQ[n*6^k + 1], Return[k]]] /. Null -> 0; Table[a[n], {n, 1, 120}]
  • PARI
    a(n) = if(n%5==4, 0, for(k = 1, 10000, if(ispseudoprime(n*6^k+1), return(k))))

A215540 Least k such that (2*n-1)*2^k + 1 is a prime factor of a Fermat number 2^(2^m) + 1 for some m, or 0 if no such value exists.

Original entry on oeis.org

1, 41, 7, 14, 67, 18759, 20, 229, 147, 6838, 41
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 15 2012

Keywords

Comments

(2*n-1)*2^a(n) + 1 is in A023394.
a(n) >= 7 for n > 1.
a(39279) = 0. No n < 39279 with a(n)=0 is known.
a(12)>2500000, a(13)>2500000, a(14)=455, a(15)=57 (see Ballinger and Keller link).
No, a(13)=2141884, found in 2011. - Jeppe Stig Nielsen, Sep 07 2019

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[k = 1; While[True, p = n*2^k + 1; If[PrimeQ[p] && IntegerQ@Log[2, MultiplicativeOrder[2, p]], AppendTo[lst, k]; Break[]]; k++], {n, 1, 9, 2}]; lst

A361076 Array, read by ascending antidiagonals, whose n-th row consists of the powers of 2, if n = 1; of the primes of the form (2*n-1)*2^k+1, if they exist and n > 1; and of zeros otherwise.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 2, 3, 5, 8, 1, 4, 7, 6, 16, 1, 2, 6, 13, 8, 32, 2, 3, 3, 14, 15, 12, 64, 1, 8, 5, 6, 20, 25, 18, 128, 3, 2, 10, 7, 7, 26, 39, 30, 256, 6, 15, 4, 20, 19, 11, 50, 55, 36, 512, 1, 10, 27, 9, 28, 21, 14, 52, 75, 41, 1024, 1, 4, 46, 51, 10, 82, 43, 17, 92, 85, 66, 2048
Offset: 1

Views

Author

Keywords

Comments

Is a(n) <= A279709(n)?

Examples

			Table starts
  1   2   4   8  16  32  64 128 ... A000079
  1   2   5   6   8  12  18  30 ... A002253
  1   3   7  13  15  25  39  55 ... A002254
  2   4   6  14  20  26  50  52 ... A032353
  1   2   3   6   7  11  14  17 ... A002256
  1   3   5   7  19  21  43  81 ... A002261
  2   8  10  20  28  82 188 308 ... A032356
  1   2   4   9  10  12  27  37 ... A002258
  ...
(2*39279 - 1)*2^r + 1 is composite for every r > 0 (see comments from A046067), so the 39279th row is A000004, the zero sequence.
		

Crossrefs

Programs

  • PARI
    vk(k, nn) = if (k==1, return (vector(nn, i, 2^(i-1)))); my(v = vector(nn-k+1), nb=0, i=0, x); while (nb != nn-k+1, if (isprime((2*k-1)*2^i+1), nb++; v[nb] = i); i++;); v;
    lista(nn) = my(v=vector(nn, k, vk(k, nn))); my(w=List()); for (i=1, nn, for (j=1, i, listput(w, v[i-j+1][j]););); Vec(w); \\ Michel Marcus, Mar 03 2023
Showing 1-6 of 6 results.