2. Find all natural numbers $n$ for which the value of the expression $\left[\frac{n^{2}}{4}\right]$ is a square of an integer.

NOTE. $\mathrm{S}[x]$ denotes the integer part of the number $x$, which is the greatest integer less than or equal to $x$.
IV/2. Let $n$ be an even natural number, $n=2k$. Then $\frac{n^{2}}{4}=k^{2}$ is an integer, so $\left[\frac{n^{2}}{4}\right]=k^{2}$ is a perfect square.

If $n$ is an odd number, we can write it in the form $n=2k+1, k \geq 0$. Then

$$
\left[\frac{n^{2}}{4}\right]=\left[\frac{4k^{2}+4k+1}{4}\right]=\left[k^{2}+k+\frac{1}{4}\right]=k^{2}+k=k(k+1)
$$

For the number $k(k+1)$ to be a perfect square, both $k$ and $k+1$ must be perfect squares, since they are coprime, i.e., $k=a^{2}$ and $k+1=b^{2}$, from which it follows that $(b-a)(b+a)=1$. There are two possibilities, namely $b-a=1=b+a$ and $b-a=-1=b+a$. Both lead to $k=0$, so $n=1$ is the only such odd number.

To see that $k^{2}+k$ is a perfect square, we can also consider the quadratic equation $k^{2}+k-x^{2}=0$, which has solutions $k_{1,2}=\frac{-1 \pm \sqrt{1+4x^{2}}}{2}$, so $1+4x^{2}=y^{2}$ or $(y-2x)(y+2x)=1$. From this, it follows that $x=0$, so $k=0$.

The value of the expression $\left[\frac{n^{2}}{4}\right]$ is a perfect square if and only if $n=1$ or $n$ is an even number.

If $n$ is an even natural number, then $\left[\frac{n^{2}}{4}\right]$ is a perfect square ............................................

If $n=2k+1$, then $\left[\frac{n^{2}}{4}\right]=k^{2}+k \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots$

The conclusion that $k$ and $k+1$ are perfect squares or solving the quadratic equation $k^{2}+k-x^{2}=0$

1 point

![](https://cdn.mathpix.com/cropped/2024_06_07_2dd3bccc19bc96d6d7dfg-17.jpg?height=51&width=1633&top_left_y=794&top_left_x=220)

Answer . ................................................................................. 1 point