Maths Olympiad Prep

Library / /11 of 29

Number theory Difficulty 5.6 AIME, harder Prove it Silk Road Mathematics Competition

Let n2n \ge 2 be an integer. Prove that
(1n1+2n1++(n1)n1)+1 is divisible by n (1^{n-1} + 2^{n-1} + \dots + (n-1)^{n-1}) + 1 \text{ is divisible by } n
if and only if, for each prime factor pp of nn
np1 is divisible by p and np1 is divisible by p1. \frac{n}{p}-1 \text{ is divisible by } p \text{ and } \frac{n}{p}-1 \text{ is divisible by } p-1.

Solution

For simplicity let's enumerate the statements.
(1) (1n1+2n1++(n1)n1)+1(1^{n-1} + 2^{n-1} + \dots + (n-1)^{n-1}) + 1 is divisible by nn
(2) np1\frac{n}{p}-1 divisible by pp and np1\frac{n}{p}-1 divisible by p1p-1
Let n=Apn = Ap. Firstly, observe that
k=1n1kn1{A(mod p),if n1 is divisible by p1,0(mod p),if n1 is not divisible by p1 \sum_{k=1}^{n-1} k^{n-1} \equiv \begin{cases} -A & (\text{mod } p), & \text{if } n-1 \text{ is divisible by } p-1, \\ 0 & (\text{mod } p), & \text{if } n-1 \text{ is not divisible by } p-1 \end{cases}
The first case is clear, it follows from Fermat's little theorem. And the second can be shown, for instance, as follows: let gg be a primitive root by modulo pp, then
k=1p1kn1k=1p1(gk)n1gn1k=1p1kn1(modp) \sum_{k=1}^{p-1} k^{n-1} \equiv \sum_{k=1}^{p-1} (gk)^{n-1} \equiv g^{n-1} \sum_{k=1}^{p-1} k^{n-1} \pmod{p}
and gn1≢1(modp)g^{n-1} \not\equiv 1 \pmod{p} implies that k=1n1kn10(modp)\sum_{k=1}^{n-1} k^{n-1} \equiv 0 \pmod{p}.
Suppose that (1) holds. Then either n1n-1 divisible by p1p-1 and A1A-1 divisible by pp, or n1n-1 divisible by p1p-1 and 11 divisible by pp. Therefore, n1n-1 divisible by p1p-1 and A1A-1 divisible by pp. Hence, n1=(p1)A+A1n-1 = (p-1)A + A-1 divisible by p1A1p-1 \Rightarrow A-1 divisible by p1p-1, we obtain (2).
Now suppose that (2) holds. A1A-1 divisible by pnp \Rightarrow n is not divisible by p2p^2, so nn is squarefree. A1A-1 divisible by p1p(A1)=n1(p1)p-1 \Rightarrow p(A-1) = n-1-(p-1) divisible by p1n1p-1 \Rightarrow n-1 divisible by p1p-1. Therefore,
1+k=1n1kn11A0(modp), 1 + \sum_{k=1}^{n-1} k^{n-1} \equiv 1 - A \equiv 0 \pmod{p},
since A1A-1 divisible by pp. Because this holds for every prime divisor pp of nn, and nn is squarefree, using the Chinese Remainder Theorem, we obtain (1).

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 and solution reproduced as published; topic and difficulty added by this site.