1999 IMO Problems/Problem 4

Problem

Determine all pairs $(n,p)$ of positive integers such that

$p$ is a prime, $n$ not exceeded $2p$, and $(p-1)^{n}+1$ is divisible by $n^{p-1}$

Solution

This problem needs a solution. If you have a solution for it, please help us out by adding it. official solution Clearly we have the solutions $(1,p)$ and $(2,2)$, and for every other solution $p \geq 3$. It remains to find the solutions $(x,p)$ with $x \geq 2$ and $p \geq 3$. We claim that in this case $x$ is divisible by p and $x y 2p$, whence $x = p$. This will lead to

$\[p^{p-1}|(p-1)^{p}+1=p^{2}\left(p^{p-2}-{p \choose 1}p^{p-3}+ \cdots + -{p \choose p-3}p-{p \choose p-2}+1\right)\]$ (Error compiling LaTeX. Unknown error_msg)

therefore, because all the terms in the brackets excepting the last one is divisible by $p$,$p-1 \leq 2$. This leaves only $p=3$ and $x=3$. Let us prove now the claim. Since $(p-1)^{x}+1$ is odd, so is $x$ (therefore $x < 2p$). Denote by q the smallest prime divisor of $x$. $q|(p-1)^{x}+1$ we get $(p-1)^{x} \equiv -1 \pmod {q}$ and $(q,p-q)=1$. But $(x,p-q)=1$ (from the choice of q) leads to the existence of integers $u,v$ such that $ux+v(q-1)=1$, whence $p-1 \equiv (p-1)^{ux}$. $(p-1)^{v(q-1)} \equiv (-1)^{u} \cdot 1^{v} \equiv -1 \pmod {q}$, because $u$ must be odd. This shows that $q|p$, therefore $q=p$. In conclusion the required solutions are $(2,2), (3,3)$ and $(1,p)$, where $p$ is an arbitrary prime.

See Also

1999 IMO (Problems) • Resources
Preceded by
Problem 3
1 2 3 4 5 6 Followed by
Problem 5
All IMO Problems and Solutions