Problem 3. A natural number $A$ is called interesting if there exists a natural number $B$ such that:

- $A>B$;
- the difference between the numbers $A$ and $B$ is a prime number;
- the product of the numbers $A$ and $B$ is a perfect square.

Find all interesting numbers greater than 200 and less than 400.
Answer: $225,256,361$.

Solution. Let $A-B=p-$ a prime number. By the condition $A B=B(B+p)=n^{2}$ for some natural $n$. Note that the GCD of the numbers $B$ and $B+p$ divides their difference, which is $p$, so it is either $p$ or 1. Let's consider two cases.

- Suppose, GCD $(B, B+p)=p$. Then $B=p s$ and $B+p=p(s+1)$ for some natural $s$. Then $n^{2}=B(B+p)=p s \cdot p(s+1)$, i.e., $n^{2}=p^{2} s(s+1)$. It follows that $n$ is divisible by $p$, so $s(s+1)=\left(\frac{n}{p}\right)^{2}$ - a perfect square. But $s^{2}<s(s+1)<(s+1)^{2}$, which means that $s(s+1)$ cannot be a perfect square. Therefore, this case is impossible.
- Suppose, GCD $(B, B+p)=1$. Then $B$ and $B+p$ are coprime, and since their product is a perfect square, both $B$ and $B+p$ must be perfect squares. Let $B=b^{2}$ and $B+p=a^{2}$ for some natural numbers $a$ and $b$. Then $p=a^{2}-b^{2}=(a-b)(a+b)$. Since the product of natural numbers $a-b$ and $a+b$ is equal to the prime number $p$, it follows that $a-b=1$ and $a+b=p$. Then $a=\frac{p+1}{2}$ and $b=\frac{p-1}{2}$, so $B=\left(\frac{p-1}{2}\right)^{2}$ and $A=\left(\frac{p+1}{2}\right)^{2}$. Since the number $p$ is prime, we get several cases:
- If $p \leqslant 23$, then $A \leqslant 12^{2}=144$ - does not fit the condition of the problem.

## Criteria

The following criteria are used:

7 6. Any complete solution to the problem.

6 p. The explicit form of the numbers $A$ and $B$ is found, but all possible values of $A$ from 200 to 400 are not correctly found.

3 p. It is proven that the numbers $A$ and $B$ are perfect squares, but there is no further progress.

16 . Only the correct answer is provided.