A057192 Least m such that 1 + prime(n)*2^m is a prime, or -1 if no such m exists.
0, 1, 1, 2, 1, 2, 3, 6, 1, 1, 8, 2, 1, 2, 583, 1, 5, 4, 2, 3, 2, 2, 1, 1, 2, 3, 16, 3, 6, 1, 2, 1, 3, 2, 3, 4, 8, 2, 7, 1, 1, 4, 1, 2, 15, 2, 20, 8, 11, 6, 1, 1, 36, 1, 279, 29, 3, 4, 2, 1, 30, 1, 2, 9, 4, 7, 4, 4, 3, 10, 21, 1, 12, 2, 14, 6393, 11, 4, 3, 2, 1, 4, 1, 2, 6, 1, 3, 8, 5, 6, 19, 3, 2, 1, 2, 5
Offset: 1
Keywords
Examples
a(8) = 6 because prime(8) = 19 and the first prime in the sequence 1 + 19 * {2, 4, 8,1 6, 32, 64} = {39, 77, 153, 305, 609, 1217} is 1217 = 1 + 19 * 2^6.
References
- See A046067.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- Ray Ballinger and Wilfrid Keller, Sierpiński Problem
- Timothy Revell, "Crowdsourced prime number could help solve a 50-year-old problem", New Scientist, November 18, 2016.
- Tejas R. Rao, Effective primality test for p*2^n+1, p prime, n>1, arXiv:1811.06070 [math.NT], 2018.
- Seventeen or Bust, A Distributed Attack on the Sierpinski problem
- StackExchange, If p is prime, does there exist a positive integer k such that 2^k*p + 1 is also prime?
Crossrefs
Programs
-
Maple
a := proc(n) local m: m := 0: while not isprime(1+ithprime(n)*2^m) do m := m+1: od: m: end: # Lorenzo Sauras Altuzarra, Feb 12 2021
-
Mathematica
Table[p = Prime[n]; k = 0; While[Not[PrimeQ[1 + p * 2^k]], k++]; k, {n, 100}] (* T. D. Noe *)
-
PARI
a(n) = my(m=0, p=prime(n)); while (!isprime(1+p*2^m), m++); m; \\ Michel Marcus, Feb 12 2021
Extensions
Corrected by T. D. Noe, Aug 03 2005
Comments