Maths Olympiad Prep

Library / IMO Hk TST /91 of 119

IMO Hk TST

Number theory Difficulty 8.3 Shortlist Prove it Hong Kong

For a positive integer nn, let f(n)f(n) be the largest kk such that 2k2^k divides nn and g(n)g(n) be the sum of the digits of the binary representation of nn. Prove that for any positive integers nn,
(i) f(n!)=n−g(n)f(n!) = n - g(n);
(ii) 44 divides (2nn)=(2n)!n!n!\binom{2n}{n} = \frac{(2n)!}{n!n!} if and only if nn is not a power of 22.

Solution

(i) This is an alternative form of Legendre's formula. Here is a simple proof of the result. Let n=asas−1⋯a0‾n = \overline{a_s a_{s-1} \cdots a_0} be the binary representation of nn. Then we have
f(n!)=∑j=1s⌊n2j⌋=∑j=1sasas−1⋯aj‾(2j)=∑j=1s∑k=jsak⋅2k−j=∑k=1s∑j=1kak⋅2k−j=∑k=1sak(2k−1)=∑k=1sak⋅2k−∑k=1sak=n−g(n). \begin{aligned} f(n!) &= \sum_{j=1}^{s} \left\lfloor \frac{n}{2^j} \right\rfloor = \sum_{j=1}^{s} \overline{a_s a_{s-1} \cdots a_j} (2^j) = \sum_{j=1}^{s} \sum_{k=j}^{s} a_k \cdot 2^{k-j} = \sum_{k=1}^{s} \sum_{j=1}^{k} a_k \cdot 2^{k-j} \\ &= \sum_{k=1}^{s} a_k (2^k - 1) = \sum_{k=1}^{s} a_k \cdot 2^k - \sum_{k=1}^{s} a_k = n - g(n). \end{aligned}

(ii) By part (a), we have
f((2n)!n!n!)=f((2n)!)−2f(n!)=[2n−g(2n)]−2[n−g(n)]=2g(n)−g(2n)=2g(n)−g(n)=g(n). \begin{aligned} f\left(\frac{(2n)!}{n!n!}\right) &= f((2n)!) - 2f(n!) \\ &= [2n - g(2n)] - 2[n - g(n)] \\ &= 2g(n) - g(2n) \\ &= 2g(n) - g(n) \\ &= g(n). \end{aligned}
Thus, 44 divides (2nn)\binom{2n}{n} if and only if g(n)≥2g(n) \ge 2. This holds if and only if n=100⋯0(2)=2kn = 100\cdots0_{(2)} = 2^k for some nonnegative integer kk.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.