1. Find all values of $n$ for which the sum

$$
1!+2!+3!+\cdots+n!, \text { where } n!=1 \cdot 2 \cdot 3 \cdots n
$$

is a perfect square.
Answer: $n=1 ; 3$.

Solution.

$1!=1=1^{2}, \quad 1!+2!=3, \quad 1!+2!+3!=9=3^{2}, \quad 1!+2!+3!+4!=33$,

$1!+2!+3!+4!+5!=33+120=153$.

In the further steps, the last digit will always be 3, as 33 will always be added to numbers ending in zero. Therefore, there will be no more perfect squares. Thus, the condition of the problem is satisfied by only two values $n=1$ and $n=3$.