TITLE: Prove that for no n>1 is the sum $(1!)^2+\cdots+(n!)^2$ a perfect square.
QUESTION [5 upvotes]: Prove that for no $n>1$ is the sum $(1!)^2+\cdots+(n!)^2$ a perfect square.
I know that $(1!)^2+\cdots+(n!)^2=\sum_{j=1}^{n} (j!)^2$. I also know that the all squares are congruent to 0 or 1 mod 4. But I was experimenting with a couple n's and found that they are equal to 1 mod 4. Is the statement above true?

REPLY [9 votes]: Hint: Work modulo $3$. ${}{}{}{}$

REPLY [3 votes]: First, show that no perfect square can be equivalent to $7 \pmod{10}$.
From here, note that $n! \equiv 0 \pmod{10}$ for all $n \geq 5$.
Hence, we get:
$$\sum\limits_{k=1}^n(k!)^2 \equiv 1! + (2!)^2 + (3!)^2 + (4!)^2 \equiv 617 \equiv 7 \pmod{10}$$

Edit: Per Andre's response, working $\pmod{3}$ is a lot easier.  (I chose $10$ since it's super easy to just look at the last digit).  Nevertheless, the strategy is the same: find all the residue classes for perfect squares $\pmod{3}$, then show that  $\sum\limits_{k=1}^n(k!)^2$ does not belong to one of them.