Find all positive integers satisfying .
Singapore Mathematical Olympiad (SMO)
Solution
We first check that are solutions among , with respectively.
We now assume that . By Legendre's formula, we know that where is the number of non-zero digits in the binary representation of . Thus .
If , letting odd() denote the odd part of , we have
which cannot happen as is odd and the other two terms are even. Hence and we must have is a power of 2.
Let . Then . We claim that . To see so, we pair up with . If , then and so we have
and we have an even number of such pairs. This gives us a product of 1. The remaining 's are of simply and , whose odd part multiply to 3 mod 8. Hence the total product is 3 mod 8 as desired. Then
Thus which leads to . So there are no other solutions.
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.