How to prove that the number $1!+2!+3!+...+n!$ is never square? How to prove that the number $1!+2!+3!+...+n! \ \forall n \geq 4$ is never square?
I was told to count permutations but I cannot figure out what we are permuting.... Thanks!
 A: The first few cases are easily dealt with: $1!=1$ and $1!+2!+3!=9$ are squares, while $1!+2!=3$ is not.
For $n \ge 4$, $1!+2!+3!+ \ldots + n!$ is congruent to 3 mod 5. But all squares are congruent to 0, 1, or 4 mod 5.
A: You can also use mod $7$ to solve this.
Firstly, manually checking $n=1,2,3,4,5$ gives only the solutions $n=1$, $n=3$.
If $n\ge 6$, then $$1!+2!+\cdots+n!$$
$$\equiv 1!+2!+3!+4!+5!+6!\pmod{7}$$
$$\equiv 5\equiv m^2\pmod{7},$$
contradiction, because $5$ is not a quadratic residue mod $7$ (notice $(7k\pm 1)^2\equiv 1\pmod{7}$, $(7k\pm 2)^2\equiv 4\pmod{7}$, $(7k\pm 3)^2\equiv 2\pmod{7}$).
mod $13$ would also work analogously. If $n\ge 12$, then $$1!+2!+\cdots+n!$$
$$\equiv 1!+2!+\cdots+12!\equiv 11\pmod{13}$$
and $11$ is not a quadratic residue mod $13$.
Using this method mod $9$ or mod $11$ wouldn't work (the residues would be $0$, which is a square mod every integer).
mod $17$ would also work -- the residue would be $12$, which is not quadratic mod $17$.
A: Firstly, it's only true for n > 3. Secondly, I don't see how to do it with permutations.
But the key is to consider residue classes mod 10. $ 1! + 2! + ... + n! $ is congruent to either 3 or 8 mod 10, but no square ends in either 3 or 8.
