OFFSET
1,2
COMMENTS
a(n) is the maximum value of tau(k)=A000005(k) for k in the interval [2^(n-1), 2^n - 1]. For n >= 3, that smallest k at which tau(k) is maximized in that interval is A036484(n).
No term is repeated: for n >= 1, if k is the number in [2^(n-1), 2^n - 1] at which tau(k) is maximized (i.e., tau(k) = a(n)), then 2k, which will be a number in [2^n, 2^(n+1) - 1], will have more divisors than k has, so a(n+1) >= tau(2k) > tau(k) = a(n).
EXAMPLE
There are four 3-bit numbers: 4 = 100_2, 5 = 101_2 = 5, 6 = 110_2, 7 = 111_2. 5 and 7 are both prime, so each has 2 divisors; 4 = 2^2 has 3 divisors (1, 2, and 4), and 6 = 2*3 has 4 divisors (1, 2, 3, and 6). Thus, the maximum number of divisors among 3-bit numbers is A000005(6) = 4, so a(3)=4.
MATHEMATICA
a[n_]:=Max[Table[DivisorSigma[0, k], {k, 2^(n-1), 2^n-1}]]; Table[a[n], {n, 23}] (* Stefano Spezia, Aug 02 2021 *)
PROG
(Python)
from sympy import divisors
def a(n): return max(len(divisors(n)) for n in range(2**(n-1), 2**n))
print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Aug 02 2021
(PARI) a(n) = vecmax(apply(numdiv, [2^(n-1)..2^n-1])); \\ Michel Marcus, Aug 03 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Jul 30 2021
STATUS
approved