Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Sep 03 2021 20:56:14
%S 2,3,3,39,4,4,4,5,6,5,5,6,5,5,5,7,6,6,11,7,6,29,6,6,7,6,6,7,6,6,6,8,8,
%T 7,7,10,9,7,8,9,7,8,7,7,8,7,8,10,7,7,26,9,7,8,7,7,10,7,7,8,7,7,7,47,8,
%U 14,9,11,10,9,10,8,9,8,8,31,8,8,15,8,10,9
%N a(n) = k is the smallest exponent k such that 2^k - (2n+1) is a prime number, or 0 if no such k exists.
%C As D. W. Wilson observes, this is similar to the Riesel/Sierpinski problem and there is e.g. no prime of the form 2^k - 777149, which is divisible by 3,5,7,13,19,37 or 73 if k is in 1+2Z, 2+4Z, 4+12Z, 8+12Z, 12+36Z, 0+36Z resp. 24+36Z. Already for n=935 it is difficult to find a solution. Is this linked to the fact that 2n+1=1871 is member of a prime quadruple (A007530) and quintuple (A022007)? - _M. F. Hasler_, Apr 07 2008
%H T. D. Noe, <a href="/A096502/b096502.txt">Table of n, a(n) for n = 0..934</a>
%H F. Firoozbakht, M. F. Hasler, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Hasler/hasler2.html">Variations on Euclid's formula for Perfect Numbers</a>, JIS 13 (2010) #10.3.1.
%e a(0)=A000043(1)=2, a(1)=A050414(1)=3, a(2)=A059608(1)=3, a(3)=A059609(1)=39.
%e For n=110 and n=111 even these smallest exponents are rather large: a(110)=714, a(111)=261 which mean that 2^714-221 and 2^261-223 are the least corresponding prime numbers.
%t Table[k = 1; While[2^k < n || ! PrimeQ[2^k - n], k++]; k, {n, 1, 1869, 2}] (* _T. D. Noe_, Mar 18 2013 *)
%o (PARI) A096502(n,k)={ k || k=log(n)\log(2)+1; n=2*n+1; while( !ispseudoprime(2^k++-n),);k } /* will take a long time for n=935... */ - _M. F. Hasler_, Apr 07 2008
%Y Cf. A000043, A007530, A022007, A050414, A059608, A059609.
%K nonn,hard
%O 0,1
%A _Labos Elemer_, Jul 09 2004