OFFSET
0,4
COMMENTS
Related to the search of primitive weird numbers A006037 of the form 2^(k-1)*Q*R with Q=2^n-1 and R=(2^k*Q-Q-1)/(Q+1-2^k). (Of course only primes n can lead to a (Mersenne) prime Q (cf. A000043), and R must also be prime to get a weird number.)
For n>2, there always exists such a k=a(n)>0, since k=n-1 trivially satisfies the condition (2^(n-k)-1 = 1).
For odd indices n>2, k=a(n)=(n+1)/2 since this is the least k>n/2 and 2^(k-1)-1 divides 2^k-2.
FORMULA
For n = 2m-1 > 2, a(n) = m.
For all n, a(n) <= n-1, and equality holds when n-1 is a prime.
Conjecture: a(n) = n - A032742(n-1), for n > 2. - Ridouane Oudra, Mar 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Aug 17 2014
STATUS
approved