OFFSET
0,2
COMMENTS
Offset to match A332979.
Let n_2 be the binary expansion of n with a length of b bits. Let W(n) = A000120(n) the binary weight of n, i.e., the number of ones in n_2, while Z(n) = b - W(n) be the number of zeros in n_2. Let Q be the number of runs of ones in n_2, L(k) be the run length of the k-th least significant run of ones, and P(k) the partial sum of the number of zeros to the right of the k-th run of ones.
Define the Doudna function f(n) = Product_{k=1..Q} prime(P(k)+1)^L(k). The Doudna sequence A005940(n) = s(n) = f(n-1) with s(1) = 1.
Theorem 1: the maximum of s(n) for n = 2^(k-1)+1..2^k is a prime power.
Proof. s(n) corresponds to f(m), m = n-1, hence m = 2^(k-1)..2^k. The number m in this domain has k bits. Binary numbers involve zeros and ones, thus, k = W(m) + Z(m). It is clear that W(m) = Omega(f(m)) and Z(m) = pi(gpf(f(m)))-1. Hence we have k = Omega(f(m)) + pi(gpf(f(m)))-1. We maximize f(m) for a k-bit number m when the greatest prime factor of f(m) has maximum multiplicity, therefore the maximum of s(n) for n = 2^(k-1)+1..2^k is a prime power.
Theorem 2: s(2^k-2^j+1) = prime(j+1)^(k-j), j=1..k-1.
Proof: We write (2^k-2^j)_2 as (k-j) ones followed by j zeros, a k-bit binary number. We have Q=1 run of ones in (2^k-2^j)_2. Therefore f(2^k-2^j) = prime(P(1)+1)^L(1) = prime(j+1)^(k-j), that is, row k of A180944.
The maximum of s(n) for n = 2^(k-1)+1..2^k is tantamount to the maximum of row k of A180944.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..3321
Michael De Vlieger, Fan style binary tree showing row m = 2..15 of A005940, highlighting A332979(m-1) in red.
FORMULA
a(0) = 1; a(n) = 2^n - 2^(pi(p)-1) + 1 for A332979(n) = p^e and n>1.
EXAMPLE
MATHEMATICA
{1}~Join~Table[2^n - 2^(# - 1) + 1 &[FirstPosition[#, Max[#]][[1]]] &@ Thread[Power[Prime[#], Reverse[#] ] ] &@ Range[n], {n, 34}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Aug 24 2022
STATUS
approved