## Task A-2.8. (10 points)

Determine all integers $x$ for which $x^{2}+3 x+24$ is a square of some integer.
## First solution.

It must be $x^{2}+3 x+24=y^{2}$, for some $y \in \mathbb{N}_{0}$, which means the equation $x^{2}+3 x+24-y^{2}=0$ must hold.

(1 point)

The discriminant of this quadratic equation in $x$ is $D=9-4\left(24-y^{2}\right)=4 y^{2}-87$. (1 point)

For $x$ to be an integer, it must be true that $4 y^{2}-87=a^{2}$ for some $a \in \mathbb{N}_{0}$. Therefore, we have $4 y^{2}-a^{2}=87$, or $(2 y-a)(2 y+a)=87$.

(2 points)

The prime factorization of the number 87 is $87=3 \cdot 29$. Since $2 y+a \geqslant 0$, both factors are positive, and $2 y-a<2 y+a$.

(1 point)

Therefore, we have two possibilities:

$2 y-a=1, 2 y+a=87$, or $2 y-a=3, 2 y+a=29$

In the first case, $y=22, a=43$

so the desired numbers satisfy the quadratic equation $x^{2}+3 x-460=0$,

whose solutions are $x=20$ and $x=-23$.

(2 points)

In the second case, $y=8, a=13$

so the desired numbers satisfy the quadratic equation $x^{2}+3 x-40=0$,

whose solutions are 5 and -8.

(2 points)

Therefore, all possible integer solutions are $-23, -8, 5$, and 20.