A040076 Smallest m >= 0 such that n*2^m + 1 is prime, or -1 if no such m exists.
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
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.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000 (with help from the Sierpiński problem website)
- Ray Ballinger and Wilfrid Keller, The Sierpiński Problem: Definition and Status
- Seventeen or Bust, A Distributed Attack on the Sierpiński problem
Crossrefs
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 *)
Comments