Number theoryDifficulty 8.3ShortlistProve itHong Kong
For a positive integer n, let f(n) be the largest k such that 2k divides n and g(n) be the sum of the digits of the binary representation of n. Prove that for any positive integers n, (i) f(n!)=n−g(n); (ii) 4 divides (n2n)=n!n!(2n)! if and only if n is not a power of 2.
Solution
(i) This is an alternative form of Legendre's formula. Here is a simple proof of the result. Let n=asas−1⋯a0 be the binary representation of n. Then we have f(n!)=j=1∑s⌊2jn⌋=j=1∑sasas−1⋯aj(2j)=j=1∑sk=j∑sak⋅2k−j=k=1∑sj=1∑kak⋅2k−j=k=1∑sak(2k−1)=k=1∑sak⋅2k−k=1∑sak=n−g(n).
(ii) By part (a), we have f(n!n!(2n)!)=f((2n)!)−2f(n!)=[2n−g(2n)]−2[n−g(n)]=2g(n)−g(2n)=2g(n)−g(n)=g(n). Thus, 4 divides (n2n) if and only if g(n)≥2. This holds if and only if n=100⋯0(2)=2k for some nonnegative integer k.
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.