How many such numbers are there so that $1! + 2! + 3! + \ldots + n!$ is a perfect square?

The answer is 2.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

For any arbitrary positive integer $a$ , $a^{2} \equiv 0, 1, 4 \mod 5$

And, for $n \geq 5$ , $n! \equiv 0 \mod 5$

let, $p^{2} = 1! + 2! + 3! + ... + n!$

Now, for $n \geq 5$ , $1! + 2! + 3! + 4! + 5! + ... + n! \equiv 1! + 2! + 3! + 4! \equiv 3 \mod 5$ $\Rightarrow p^{2} \equiv 3 \mod 5$

which contradicts the original statement for $n \geq 5$ .

Now we are left with only $n = \left \{ 1, 2, 3, 4 \right \}$ . Its trivial to find that $n = 1$ and $3$ are the solutions.

$\therefore$ the answer is $\boxed{2}$