(Very difficult: IMO 2022, P5) Find all triples of strictly positive integers $(a, b, p)$ such that $p$ is prime and $a^{p}=b!+p$.

## Solutions
Let $(a, b, p) \in\left(\mathbb{N}^{*}\right)^{3}$ be a potential solution.

Since $p \geq 2$, we have $a^{p}>1$ and thus $a>1$. Let $q$ be a prime divisor of $a$.

We have the following property: if $q \leq b$, then $q \mid a^{p}-b!=p$ and thus $q=p$.

We deduce that if $b < q$, then $q \mid a^{p}-b!=p$ implies $q \mid p$, so $q=p$. But then, since $q \mid a$, we have $a \geq q > b$ and thus, expanding using the binomial theorem, since $p \geq 2$:

$$
b!+p=a^{p} \geq(b+1)^{p}>b^{p}+p b^{p-1} \geq b^{b}+p \text {, so } \prod_{k=1}^{b} b=b^{b}0$.

Therefore, we only need to test if $p \in\{3 ; 5 ; 7\}$ leads to solutions:

- If $p=3$, we get $b=4$, which indeed provides a solution.
- If $p=5$, we get $b!=3120$ so $6!=720<b!<5040=7$!, which is impossible.
- If $p=7$, we get $b!=7^{7}-7=7\left(7^{3}-1\right)\left(7^{3}+1\right)=7 \cdot 342 \cdot 344$ which is not divisible by 5, which is impossible since we know that $b \geq p=7 \geq 5$.

Finally, the solutions to the problem are the triplets $(2,2,2)$ and $(3,4,3)$.

## 6 Ratio Hunting (Martin)

The goal of this exercise is to familiarize yourself with the method known as ratio hunting. Just like angle chasing, ratio hunting involves combining multiple ratio equalities to derive new ones.

We recall the theorems that produce or are produced by ratio equalities:

- Thales' theorem, which gives an equivalence between a ratio equality and parallel lines.
- The power of a point, which gives an equivalence between a ratio equality and cocyclic points.
- The converse of Thales' theorem, which allows, from a ratio equality, to obtain a parallelism or even (and this is less thought of) an alignment of three points.

## Exercises

The following exercises use only Thales' theorem, the concept of similar triangles, and the power of a point with respect to a circle.