Maths Olympiad Prep

Library / /106 of 136

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!)=ng(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=asas1a0n = \overline{a_s a_{s-1} \cdots a_0} be the binary representation of nn. Then we have
f(n!)=j=1sn2j=j=1sasas1aj(2j)=j=1sk=jsak2kj=k=1sj=1kak2kj=k=1sak(2k1)=k=1sak2kk=1sak=ng(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!)=[2ng(2n)]2[ng(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=1000(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,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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