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

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

A057026 Smallest prime of form (2n+1)*2^m-1 for some m, or 0 if no such prime exists.

Original entry on oeis.org

3, 2, 19, 13, 17, 43, 103, 29, 67, 37, 41, 367, 199, 53, 463, 61, 131, 139, 73, 311, 163, 5503, 89, 751, 97, 101, 211, 109, 113, 241663, 487, 251, 1039, 2143, 137, 283, 9343, 149, 307, 157, 647, 331, 2719, 173, 1423, 181, 743, 379, 193, 197, 103423, 823, 419
Offset: 0

Views

Author

Henry Bottomley, Jul 24 2000

Keywords

Comments

If a(329) > 0 it is greater than 659*2^10000. - Robert Israel, Jul 01 2014
Indeed, a(329) > 659*2^100000 if it is nonzero. There does not appear to be a covering set, though, so probably a(329) > 0. - Charles R Greathouse IV, Jul 02 2014
a(329) = 659*2^800516 - 1 (found by David W Linton in 2004). - Robert Israel, Jul 04 2014

Examples

			a(5)=43 because 2*5+1=11 and smallest prime of the form 11*2^m-1 is 43 (since 10 and 21 are not prime)
		

Crossrefs

Programs

  • Maple
    A057026:= proc(n)
    local t;
         t:= 2*n;
         while not isprime(t) do t:= 2*t+1 od;
         t
    end proc;
    seq(A057026(n),n=0..328); # Robert Israel, Jul 01 2014

A291438 Smallest prime of the form (2*n)*3^m + 1 for some m >= 0, or -1 if no such prime exists.

Original entry on oeis.org

3, 5, 7, 73, 11, 13, 43, 17, 19, 61, 23, 73, 79, 29, 31, 97, 103, 37, 3079, 41, 43, 397, 47, 433, 151, 53, 163, 1102249, 59, 61, 5023, 193, 67, 613, 71, 73, 223, 229, 79, 241, 83, 757, 6967, 89, 271, 277, 283, 97, 883, 101, 103, 313, 107, 109, 331, 113, 3079
Offset: 1

Views

Author

Martin Renner, Aug 23 2017

Keywords

Comments

There exist even integers 2*n such that (2*n)*3^m + 1 is always composite.
It is conjectured that the smallest one is 125050976086 = A123159(3), therefore a(62525488043) = -1.
For the corresponding numbers m see A291437.

Examples

			a(4) = 73 because 8*3^2 + 1 = 73 is the smallest prime of this form, since 8*3^0 + 1 = 9 and 8*3^1 + 1 = 25 are not prime.
		

Crossrefs

Programs

  • Maple
    a:=[]:
    for n from 1 to 10^3 do
      t:=-1:
      for m from 0 to 10^3 do # this max value of m is sufficient up to n=10^3
        if isprime((2*n)*3^m+1) then t:=m: break: fi:
      od:
      a:=[op(a),(2*n)*3^t+1]:
    od:
    a;
  • Mathematica
    Table[If[# < 0, #, 1 + 2 n*3^#] &@ SelectFirst[Range[0, 10^3], PrimeQ[2 n*3^# + 1] &] /. k_ /; MissingQ@ k -> -1, {n, 60}] (* Michael De Vlieger, Aug 23 2017 *)
  • PARI
    a(n) = {my(m = 0); while (!isprime(p=(2*n)*3^m + 1), m++); p;} \\ Michel Marcus, Aug 25 2017
Showing 1-3 of 3 results.