Maths Olympiad Prep

Library / Putnam /9 of 60

Putnam

Number theory Difficulty 7.7 National Olympiad, round 2 Find the answer

For each positive integer nn, let k(n)k(n) be the number of ones in the binary representation of 2023⋅n2023 \cdot n. What is the minimum value of k(n)k(n)?

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

The minimum is 33. First\text{First} solution.} We record the factorization 2023=7⋅1722023 = 7\cdot 17^2. We first rule out k(n)=1k(n)=1 and k(n)=2k(n)=2. If k(n)=1k(n)=1, then 2023n=2a2023n = 2^a for some aa, which clearly cannot happen. If k(n)=2k(n)=2, then 2023n=2a+2b=2b(1+2a−b)2023n=2^a+2^b=2^b(1+2^{a-b}) for some a>ba>b. Then 1+2a−b≡0(mod7)1+2^{a-b} \equiv 0\pmod{7}; but −1-1 is not a power of 22 mod 77 since every power of 22 is congruent to either 11, 22, or 4(mod7)4 \pmod{7}. We now show that there is an nn such that k(n)=3k(n)=3. It suffices to find a>b>0a>b>0 such that 20232023 divides 2a+2b+12^a+2^b+1. First note that 22+21+1=72^2+2^1+1=7 and 23≡1(mod7)2^3 \equiv 1 \pmod{7}; thus if a≡2(mod3)a \equiv 2\pmod{3} and b≡1(mod3)b\equiv 1\pmod{3} then 77 divides 2a+2b+12^a+2^b+1. Next, 28+25+1=1722^8+2^5+1 = 17^2 and 216⋅17≡1(mod172)2^{16\cdot 17} \equiv 1 \pmod{17^2} by Euler's Theorem; thus if a≡8(mod16⋅17)a \equiv 8 \pmod{16\cdot 17} and b≡5(mod16⋅17)b\equiv 5 \pmod{16\cdot 17} then 17217^2 divides 2a+2b+12^a+2^b+1. We have reduced the problem to finding a,ba,b such that a≡2(mod3)a\equiv 2\pmod{3}, a≡8(mod16⋅17)a\equiv 8\pmod{16\cdot 17}, b≡1(mod3)b\equiv 1\pmod{3}, b≡5(mod16⋅17)b\equiv 5\pmod{16\cdot 17}. But by the Chinese Remainder Theorem, integers aa and bb solving these equations exist and are unique mod 3⋅16⋅173\cdot 16\cdot 17. Thus we can find a,ba,b satisfying these congruences; by adding appropriate multiples of 3⋅16⋅173\cdot 16\cdot 17, we can also ensure that a>b>1a>b>1. Second\text{Second} solution.} We rule out k(n)≤2k(n) \leq 2 as in the first solution. To force k(n)=3k(n) = 3, we first note that 24≡−1(mod17)2^4 \equiv -1 \pmod{17} and deduce that 268≡−1(mod172)2^{68} \equiv -1 \pmod{17^2}. (By writing 268=((24+1)−1)172^{68} = ((2^4+1) - 1)^{17} and expanding the binomial, we obtain −1-1 plus some terms each of which is divisible by 17.) Since (28−1)2(2^8-1)^2 is divisible by 17217^2, 0≡216−2⋅28+1≡216+2⋅268⋅28+1=277+216+1(mod172).\begin{align*} 0 &\equiv 2^{16} - 2\cdot 2^8 + 1 \equiv 2^{16} + 2\cdot 2^{68}\cdot 2^8 + 1 \\ &= 2^{77} + 2^{16} + 1 \pmod{17^2}. \end{align*} On the other hand, since 23≡−1(mod7)2^3 \equiv -1 \pmod{7}, 277+216+1≡22+21+1≡0(mod7). 2^{77} + 2^{16} + 1 \equiv 2^2 + 2^1 + 1 \equiv 0 \pmod{7}. Hence n=(277+216+1)/2023n = (2^{77}+2^{16}+1)/2023 is an integer with k(n)=3k(n) = 3. Remark.\text{Remark.} A short computer calculation shows that the value of nn with k(n)=3k(n)=3 found in the second solution is the smallest possible. For example, in SageMath, this reduces to a single command: \text{} assert all((2^a+2^b+1) % 2023 != 0 for a in range(1,77) for b in range(1,a)) \text{}

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: Omni-MATH, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.