8.4. (Sweden, 82). For each value of $n \in \mathbb{N}$, determine how many solutions the equation $x^{2}-\left[x^{2}\right]=\{x\}^{2}$ has on the interval $[1 ; n]$.
8.4. Let $m=[x], \alpha=\{x\}$. Then $x=m+\alpha$ and the original equation will have the form

$$
(m+\alpha)^{2}-\left[m^{2}+2 m \alpha+\alpha^{2}\right]=\alpha^{2},
$$

from which

$$
m^{2}+2 m \alpha=\left[m^{2}+2 m \alpha+\alpha^{2}\right]
$$

But $m^{2} \in Z$, therefore

$$
2 m \alpha=\left[2 m \alpha+\alpha^{2}\right]
$$

The last equality for $0<\alpha<1$ is equivalent to the condition $2 m \alpha \in \mathbb{Z}$, hence $\alpha=k /(2 m)$, where $k \in\{0 ; 1 ; \ldots ; 2 m-1\}$. Therefore, for each value of $m=1, \ldots, n-1$ (for $n=1$ there are no such values), the value of $\alpha$ can take exactly $2 m$ values, and for $m=n$ we have $\alpha=0$ (since $x \leqslant n$), which means the number of solutions is

$$
2+4+\cdots+2(n-1)+1=n(n-1)+1=n^{2}-n+1
$$