(Japan 2011) Find all strictly positive integers $a, n, p, q, r$ such that

$$
a^{n}-1=\left(a^{p}-1\right)\left(a^{q}-1\right)\left(a^{r}-1\right)
$$
First, it is clear that $n \geq p, q, r \geq 1$. Since $a=1$ is a solution, assume now $a \geq 2$.

If one of the integers $p, q, r$ is equal to $n$, we necessarily have $a=2$ and the other two are equal to 1. We thus find the solutions $(a, n, p, q, r)=(2, n, 1,1, n),(2, n, 1, n, 1),(2, n, n, 1, 1)$. We assume in the following that $p, q, r < n$.

If the conditions of Zsigmondy's theorem are satisfied, then $a^{n}-1$ has a prime divisor that does not divide any of the integers $a^{p}-1, a^{q}-1, a^{r}-1$, and we cannot have $a^{n}-1=\left(a^{p}-1\right)\left(a^{q}-1\right)\left(a^{r}-1\right)$.

Otherwise, we have either:

(i) $n=2$ and $a=2^{s}-1$. In this case, since we have assumed $p, q, r < n$, we have $p=q=r=1$, and $a^{2}-1=(a-1)^{3}$. This implies $a=3$ and we find the solution $(a, n, p, q, r)=(3,2,1,1,1)$.

(ii) $a=2$ and $n=6$. In this case, we easily find the solutions

$$
(a, n, p, q, r)=(2,6,2,2,3),(2,6,2,3,2),(2,6,3,2,2)
$$