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.

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

This page as a plain text file.
%I A040076 #32 Dec 21 2021 23:49:44
%S A040076 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,
%T A040076 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,
%U A040076 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
%N A040076 Smallest m >= 0 such that n*2^m + 1 is prime, or -1 if no such m exists.
%C A040076 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.
%C A040076 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
%H A040076 T. D. Noe, <a href="/A040076/b040076.txt">Table of n, a(n) for n = 1..10000</a> (with help from the Sierpiński problem website)
%H A040076 Ray Ballinger and Wilfrid Keller, <a href="http://www.prothsearch.com/sierp.html">The Sierpiński Problem: Definition and Status</a>
%H A040076 Seventeen or Bust, <a href="http://www.seventeenorbust.com/">A Distributed Attack on the Sierpiński problem</a>
%e A040076 1*(2^0)+1=2 is prime, so a(1)=0;
%e A040076 3*(2^1)+1=5 is prime, so a(3)=1;
%e A040076 For n=7, 7+1 and 7*2+1 are composite, but 7*2^2+1=29 is prime, so a(7)=2.
%t A040076 Do[m = 0; While[ !PrimeQ[n*2^m + 1], m++ ]; Print[m], {n, 1, 110} ]
%t A040076 sm[n_]:=Module[{k=0},While[!PrimeQ[n 2^k+1],k++];k]; Array[sm,120] (* _Harvey P. Dale_, Feb 05 2020 *)
%Y A040076 For the corresponding primes see A050921.
%Y A040076 Cf. A103964, A040081.
%Y A040076 Cf. A033809, A046067 (odd n), A057192 (prime n).
%K A040076 easy,nice,sign
%O A040076 1,7
%A A040076 _David W. Wilson_