Find all composite positive integers $n$ such that all the divisors of $n$ can be written in the form $a^{r}+1$, where $a$ and $r$ are integers with $a \geq 0$ and $r \geq 2$.
The only such number is $n=10$. It is easy to see that $n=10$ indeed satisfies the conditions. Call $n$ "good" if every divisor of $n$ has the form $a^{r}+1, a \geq 0, r \geq 2$ (a good $n$ may be prime or composite).

First, it is easy to check that 4 is not good, and so 4 does not divide any good number.

Second, we show that a good integer is one more than a perfect square. Write $n=a^{r}+1$ with $r$ maximal. If $r$ is odd, $a+1$ divides $\mathrm{n}$, and so $a+1=a_{1}^{r_{1}}+1$. Hence $a=a_{1}^{r_{1}}$ and $n=a_{1}^{r r_{1}+1}$, violating the maximality assumption of $r$. Thus $r$ must be even. We conclude that $n=x^{2}+1$ for some positive integer $x$.

Third, we show that the product of two odd primes are not good. Assume on the contrary that $p q$ is good, where $p \leq q$ are odd primes. Then both $p$ and $q$ are good. We write $p=s^{2}+1, q=t^{2}+1$, and $p q=u^{2}+1$ (so $s \leq ts^{2}$ and $q$ is prime, $q$ must divide $u+t$. Note that both $t$ and $u$ are odd, so $u+t$ is even. Hence $2 q=2\left(t^{2}+1\right)$ divides $u+t$. It follows that $u+t \geq 2\left(t^{2}+1\right)=2 q$, and so $u-t \geq 2 t^{2}+2-2 t=t^{2}+1+(t-1)^{2}>s^{2}$, contradicting (5). Hence our assumption was wrong, and so no good number is divisible by a product of two odd primes.

It follows that any $n$ satisfying the conditions of the problem is of the form $n=2 p$, where $p$ is an odd prime. We can write $n=x^{2}+1$ and $p=y^{2}+1$. Hence $x^{2}+1=2 y^{2}+2$ or $p=y^{2}+1=x^{2}-y^{2}=(x-y)(x+y)$. This is true only if $x=y+1$, implying that $y=2, p=5$, and $n=10$.