Maths Olympiad Prep

Track / Stage 7 / 129 of 300 #1529 of 1964

Problem 1529

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.2 Prove it

Suppose p,qp,q are distinct primes and SS is a subset of {1,2,,p1}\{1,2,\dots ,p-1\}. Let N(S)N(S) denote the number of solutions to the equation i=1qxi0modp\sum_{i=1}^{q}x_i\equiv 0\mod p
where xiSx_i\in S, i=1,2,,qi=1,2,\dots ,q. Prove that N(S)N(S) is a multiple of qq.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

We need to prove that N(S) N(S) is a multiple of q q for any subset S S of {1,2,,p1}\{1, 2, \dots, p-1\}, where p p and q q are distinct primes. We will use induction on n=S n = |S| .

1. Base Case:
- When n=1 n = 1 , S={a} S = \{a\} for some a{1,2,,p1} a \in \{1, 2, \dots, p-1\} .
- The equation i=1qxi0modp\sum_{i=1}^{q} x_i \equiv 0 \mod p has no solutions because q q is a prime and qa≢0modp q \cdot a \not\equiv 0 \mod p (since p p and q q are distinct primes).
- Therefore, N(S)=0 N(S) = 0 , which is trivially a multiple of q q .

2. Inductive Step:
- Assume the claim holds for any subset S S with S=n |S| = n . That is, N(S) N(S) is a multiple of q q .
- Consider a new subset S S' formed by adding a new element a a to S S , so S=n+1 |S'| = n + 1 .
- We need to show that N(S) N(S') is also a multiple of q q .

3. Counting Solutions:
- Let k k be the number of solutions to i=1qxi0modp\sum_{i=1}^{q} x_i \equiv 0 \mod p where at least one xi=a x_i = a .
- Then, N(S)=N(S)+k N(S') = N(S) + k .

4. **Analyzing k k :**
- Consider solutions where a a appears l l times in the sum i=1qxi0modp\sum_{i=1}^{q} x_i \equiv 0 \mod p.
- The number of ways to choose l l positions out of q q for a a is (ql)\binom{q}{l}.
- The remaining ql q - l positions must be filled with elements from S S such that their sum modulo p p is lamodp-la \mod p.
- For each l l , the number of such solutions is (ql)M\binom{q}{l} \cdot M, where M M is the number of solutions for the remaining positions.

5. **Divisibility by q q :**
- For l=1,2,,q1 l = 1, 2, \ldots, q-1 , (ql)\binom{q}{l} is divisible by q q because q q is a prime.
- Therefore, the total number of solutions k k where at least one xi=a x_i = a is divisible by q q .

6. Conclusion:
- Since k k is divisible by q q and N(S) N(S) is a multiple of q q by the induction hypothesis, N(S)=N(S)+k N(S') = N(S) + k is also a multiple of q q .

Thus, by induction, N(S) N(S) is a multiple of q q for any subset S S of {1,2,,p1}\{1, 2, \dots, p-1\}.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.