Task 10.5. (20 points) Find all composite natural numbers $n$ that have the following property: each natural divisor of the number $n$ (including $n$ itself), decreased by 1, is a square of an integer.
Answer: 10.

Solution. Suppose that $n$ is divisible by the square of some prime number $p$. Then it has a divisor $p^{2}=b^{2}+1$; but two squares of integers can only differ by 1 if they are 0 and 1.

Let $n$ be divisible by some two prime numbers $p$ and $q$. Without loss of generality, we can assume that $p>q$. From the condition that any divisor, decreased by 1, is a square, we can write

\[
\begin{gathered}
p=a^{2}+1 \\
q=b^{2}+1 \\
p q=c^{2}+1
\end{gathered}
\]

Subtract the first equation from the third, we get $p q-p=c^{2}-a^{2}$. This can be rewritten as

\[
p(q-1)=(c-a)(c+a)
\]

Since $p$ is a prime number, one of the factors on the right side must be divisible by $p$. Note that from the condition $p>q$ it follows that $p>q-1$, so $p$ cannot divide $q-1$. Therefore, $p$ must divide $c-a$ or $c+a$. Since $p>q$, we get that $q=2$.

Substituting $q=2$, we get $2=c-a+1=p-2a+1$, from which, first, $c=a+1$, and second, $p=2a+1$. Then $p q=2 p=4a+2$ and $p q=c^{2}+1=(a+1)^{2}+1$. Equating, we get the quadratic equation $a^{2}+2a+2=4a+2$, the roots of which are 2 and 0, from which $p$ equals 5 or 1. But since $p$ must be prime, the only option left is $p=5$.

Thus, the only possible case is $p=5, q=2$. It is clear that there cannot be any other prime numbers in the factorization of $n$.

## Criteria

The highest applicable criterion is used:

20 points. Any complete solution to the problem is provided.

16 points. It is proven that $n$ is even.

4 points. The case of even $n$ is correctly analyzed.

In the absence of the above advancements, the following criteria are summed up:

+1 point. The correct answer is provided.

+1 point. It is proven that $n$ is square-free.