Maths Olympiad Prep

Library / /387 of 426

Combinatorics Difficulty 6.9 National Olympiad Prove it Saudi Arabia

Let pp be an odd prime and let N=14(p3p)1N = \frac{1}{4}(p^3 - p) - 1. The numbers 1,2,,N1, 2, \dots, N are painted arbitrarily in two colors, red and blue. For any positive integer nNn \le N, denote by r(n)r(n) the fraction of integers in {1,2,,n}\{1, 2, \dots, n\} that are red (number of red numbers divided by nn). Prove that there exists a positive integer a{1,2,,p1}a \in \{1, 2, \dots, p-1\} such that r(n)apr(n) \ne \frac{a}{p} for all n=1,2,,Nn = 1, 2, \dots, N

Solution

Denote by R(n)R(n) the number of red numbers in {1,2,,n}\{1, 2, \dots, n\}, i.e., R(n)=nr(n)R(n) = n r(n). Similarly, denote by B(n)B(n) and b(n)=B(n)/nb(n) = B(n)/n the number and proportion of blue numbers in {1,2,,n}\{1, 2, \dots, n\}, respectively. Notice that B(n)+R(n)=nB(n) + R(n) = n and b(n)+r(n)=1b(n) + r(n) = 1. Therefore, the statement of the problem does not change after swapping the colors.

Arguing indirectly, for every a{1,2,,p1}a \in \{1, 2, \dots, p-1\} choose some positive integer nan_a such that r(na)=a/pr(n_a) = a/p and, hence, R(na)=ana/pR(n_a) = a n_a / p. Clearly, pnap \mid n_a, so that na=pman_a = p m_a for some positive integer mam_a, and R(na)=amaR(n_a) = a m_a. Without loss of generality, we assume that m1<mp1m_1 < m_{p-1}, as otherwise one may swap the colors. Notice that
maNp<p214for all a=1,2,,p1. m_a \le \frac{N}{p} < \frac{p^2-1}{4} \quad \text{for all } a=1,2,\dots,p-1.
The solution is based on a repeated application of the following simple observation.

Claim. Assume that ma<mbm_a < m_b for some a,b{1,2,,p1}a, b \in \{1, 2, \dots, p-1\}. Then
mbabmaandmbpapbma. m_b \ge \frac{a}{b} m_a \quad \text{and} \quad m_b \ge \frac{p-a}{p-b} m_a.
Proof. The first inequality follows from bmb=R(nb)R(na)=amab m_b = R(n_b) \ge R(n_a) = a m_a. The second inequality is obtained by swapping colors.

Let q=(p1)/2q = (p-1)/2. We distinguish two cases.

Case 1: All qq numbers m1,m2,,mqm_1, m_2, \dots, m_q are smaller than mp1m_{p-1}.
Let mam_a be the maximal number among m1,m2,,mqm_1, m_2, \dots, m_q; then maqam_a \ge q \ge a. Applying the Claim, we get
mp1pap(p1)ma(pq)q=p214 m_{p-1} \ge \frac{p-a}{p-(p-1)} m_a \ge (p-q)q = \frac{p^2-1}{4}
which contradicts (1).

Case 2: There exists kqk \le q such that mk>mp1m_k > m_{p-1}. Choose kk to be the smallest index satisfying mk>mp1m_k > m_{p-1}; by our assumptions, we have 1<kq<p11 < k \le q < p-1.
Let mam_a be the maximal number among m1,m2,,mk1m_1, m_2, \dots, m_{k-1}; then ak1ma<mp1a \le k-1 \le m_a < m_{p-1}. Applying the Claim, we get
mkp1kmp1p1kpap(p1)map1k(pk+1)(k1)k1k(p1)(pq)12p212 \begin{align*} m_k &\ge \frac{p-1}{k} m_{p-1} \ge \frac{p-1}{k} \cdot \frac{p-a}{p-(p-1)} m_a \\ &\ge \frac{p-1}{k} \cdot (p-k+1)(k-1) \\ &\ge \frac{k-1}{k} \cdot (p-1)(p-q) \\ &\ge \frac{1}{2} \cdot \frac{p^2-1}{2} \end{align*}
which contradicts (1) again. \square

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 reproduced verbatim; metadata (topic, difficulty) added by this project.