Maths Olympiad Prep

Library / Taiwan IMO Selection Camp /308 of 359

Taiwan IMO Selection Camp, 2023

Number theory Difficulty 6.9 National Olympiad Prove it Taiwan

For every positive integer M≥2M \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 1≤k<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 CM≥1011+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,…,M−1k = 1, \dots, M-1,
{ka1M}+{ka2M}+⋯+{ka2023M}=1012⋅kM+1011⋅M−kM=1011+kM≥1011+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=1M−1{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=1M−1{kaM}≤(M−1)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=1M−1{kaM}≤(d−1)⋅0M+d⋅dM+d⋅2dM+⋯+d⋅(M/d−1)dM≤1M[(1+⋯+(d−1))+(d+⋯+2d−1)+⋯+(M−d+⋯+M−1)]=(M−1)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 Pi≤M−12P_i \le \frac{M-1}{2} for all ii. Thus ∑k=1M−1Qk=∑i=12023Pi≤2023(M−1)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 Qk≤1011Q_k \le 1011, then we are already done. Thus we can assume ⌈Qk⌉≥1012\lceil Q_k \rceil \ge 1012 for all kk, and so we have
{−Qk}=−Qk−⌊−Qk⌋=⌈Qk⌉−Qk≥1012−Qk. \{-Q_k\} = -Q_k - \lfloor -Q_k \rfloor = \lceil Q_k \rceil - Q_k \ge 1012 - Q_k.
As a consequence,
∑k=1M−1{−Qk}≥1012(M−1)−20232(M−1)=12(M−1). \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+1M≤CMQ_k = 1011 + \frac{1}{M} \le C_M, as desired.

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: MathNet, licensed CC-BY-4.0. Statement translated into English from en; metadata (topic, difficulty) added by this project.