Maths Olympiad Prep

Library / /339 of 397

, 2023

Number theory Difficulty 6.9 National Olympiad Prove it Taiwan

For every positive integer M2M \ge 2, find the smallest real number CMC_M such that for any integers a1,a2,,a2023a_1, a_2, \dots, a_{2023}, there always exists some integer 1k<M1 \le k < M such that
{ka1M}+{ka2M}++{ka2023M}CM. \left\{ \frac{ka_1}{M} \right\} + \left\{ \frac{ka_2}{M} \right\} + \dots + \left\{ \frac{ka_{2023}}{M} \right\} \le C_M.

Here, {x}\{x\} is the unique number in the interval [0,1)[0, 1) such that x{x}x - \{x\} is an integer.

Solution

The answer is 1011+1M1011 + \frac{1}{M}.

We can see that CM1011+1MC_M \ge 1011 + \frac{1}{M} by picking a2i+1=1a_{2i+1} = 1 and a2i=1a_{2i} = -1. This way, we get for all k=1,,M1k = 1, \dots, M-1,
{ka1M}+{ka2M}++{ka2023M}=1012kM+1011MkM=1011+kM1011+1M. \left\{ \frac{ka_1}{M} \right\} + \left\{ \frac{ka_2}{M} \right\} + \dots + \left\{ \frac{ka_{2023}}{M} \right\} = 1012 \cdot \frac{k}{M} + 1011 \cdot \frac{M-k}{M} = 1011 + \frac{k}{M} \ge 1011 + \frac{1}{M}.

To show that this is the best possible, let
Pi:=k=1M1{kaiM},Qk=i=12023{kaiM}. P_i := \sum_{k=1}^{M-1} \left\{ \frac{ka_i}{M} \right\}, \quad Q_k = \sum_{i=1}^{2023} \left\{ \frac{ka_i}{M} \right\}.
We claim that for any integer aa, we have k=1M1{kaM}(M1)2\sum_{k=1}^{M-1} \left\{\frac{ka}{M}\right\} \le \frac{(M-1)}{2}, and equality holds when gcd(a,M)=1\gcd(a, M) = 1. To see this, let d=gcd(a,M)d = \gcd(a, M). Then clearly
k=1M1{kaM}(d1)0M+ddM+d2dM++d(M/d1)dM1M[(1++(d1))+(d++2d1)++(Md++M1)]=(M1)2, \begin{aligned} \sum_{k=1}^{M-1} \left\{ \frac{ka}{M} \right\} & \le (d-1) \cdot \frac{0}{M} + d \cdot \frac{d}{M} + d \cdot \frac{2d}{M} + \dots + d \cdot \frac{(M/d-1)d}{M} \\ & \le \frac{1}{M} \left[ (1 + \dots + (d-1)) + (d + \dots + 2d-1) + \dots + (M-d+\dots+M-1) \right] \\ & = \frac{(M-1)}{2}, \end{aligned}
where the equality holds only when d=1d=1.

Since aa is arbitrary, by applying the claim for a=aia = a_i, we see PiM12P_i \le \frac{M-1}{2} for all ii. Thus k=1M1Qk=i=12023Pi2023(M1)2\sum_{k=1}^{M-1} Q_k = \sum_{i=1}^{2023} P_i \le \frac{2023(M-1)}{2}.

Now if there is some Qk1011Q_k \le 1011, then we are already done. Thus we can assume Qk1012\lceil Q_k \rceil \ge 1012 for all kk, and so we have
{Qk}=QkQk=QkQk1012Qk. \{-Q_k\} = -Q_k - \lfloor -Q_k \rfloor = \lceil Q_k \rceil - Q_k \ge 1012 - Q_k.
As a consequence,
k=1M1{Qk}1012(M1)20232(M1)=12(M1). \sum_{k=1}^{M-1} \{-Q_k\} \ge 1012(M-1) - \frac{2023}{2}(M-1) = \frac{1}{2}(M-1).

Note that
{Qk}={k(a1++a2023)M}. \{-Q_k\} = \left\{ \frac{-k(a_1 + \cdots + a_{2023})}{M} \right\}.
Apply the claim for a=a1++a2023a = a_1 + \cdots + a_{2023}, and we get that all equalities should hold. Thus gcd(a,M)=1\gcd(a, M) = 1 by the claim, and Qk=1012\lceil Q_k \rceil = 1012 for all kk. In particular, if we choose kk to be the inverse of aa modulo MM, then Qk=1011+1MCMQ_k = 1011 + \frac{1}{M} \le C_M, as desired.

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 translated into English from en; metadata (topic, difficulty) added by this project.