Maths Olympiad Prep

Library / /10 of 64

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 2023n2023 \cdot n. What is the minimum value of k(n)k(n)?

A number or a short expression. Spacing and $ signs are ignored.

Solution

The minimum is 33. \n\n\textbf{First solution.} We record the factorization 2023=71722023 = 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+2ab)2023n=2^a+2^b=2^b(1+2^{a-b}) for some a>ba>b. Then 1+2ab0(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 231(mod7)2^3 \equiv 1 \pmod{7}; thus if a2(mod3)a \equiv 2\pmod{3} and b1(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 216171(mod172)2^{16\cdot 17} \equiv 1 \pmod{17^2} by Euler's Theorem; thus if a8(mod1617)a \equiv 8 \pmod{16\cdot 17} and b5(mod1617)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 a2(mod3)a\equiv 2\pmod{3}, a8(mod1617)a\equiv 8\pmod{16\cdot 17}, b1(mod3)b\equiv 1\pmod{3}, b5(mod1617)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 316173\cdot 16\cdot 17. Thus we can find a,ba,b satisfying these congruences; by adding appropriate multiples of 316173\cdot 16\cdot 17, we can also ensure that a>b>1a>b>1. \n\n\textbf{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 241(mod17)2^4 \equiv -1 \pmod{17} and deduce that 2681(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 (281)2(2^8-1)^2 is divisible by 17217^2, 0216228+1216+226828+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 231(mod7)2^3 \equiv -1 \pmod{7}, 277+216+122+21+10(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. \n\n\textbf{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: \begin{verbatim} assert all((2^a+2^b+1) % 2023 != 0 for a in range(1,77) for b in range(1,a)) \end{verbatim}

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.