# Proving that $\sum\limits_{i=1}^k i! \ne n^2$ for any $n$ [duplicate]

Possible Duplicate:
How to prove that the number 1!+2!+3!+…+n! is never square?

Show that $\displaystyle\sum\limits_{i=1}^k i!$ is never a perfect square for $k\ge4$

I could prove $k!$ is never a perfect square using Bertrand's Postulate. But this one seems to be an uphill task.

-

## marked as duplicate by Chris Eagle, Jason DeVito, Asaf Karagila, Aryabhata, t.b.Mar 9 '12 at 1:03

Are you the Donald? – Stephen Mar 8 '12 at 14:45

Your summation looks like $$1!+2!+3!+4!+\cdots+k!=33+5!+\cdots+k!$$Now note that $i!$ is a multiple of $10$ whenever, $i\geq 5$, hence the last digit in your summation is going to be a $3$. By inspection modulo $10$ (I want to look at the decimal place) $$0^2=0$$$$1^2=1$$$$2^2=4$$$$3^2=9$$$$4^2=6$$$$5^2=5$$$$6^2=6$$$$7^2=9$$$$8^2=4$$$$9^2=1$$Hence, it is impossible to have a $3$ in the far most right digit of a square, which your sum does.

-
You could have made a shorter list of squares by writing $(\pm 1)^2=1$, $(\pm 2)^2=4$ etc. – Ewan Delanoy Mar 8 '12 at 17:25
Nice—I just made 31 up-votes. :) – Nick Strehlke Mar 8 '12 at 20:45
Very concise! =) – Isaac Solomon Mar 14 '12 at 5:25
$33$ is quite a lot of upvotes for a closed question -- and it also happens to be the sum of the first four factorials that you use in the proof :-) – joriki Mar 20 '12 at 8:28

Your last digit at $k=4\;:\; 1!+2!+3!+4!=33$ is $3$ and from $5!$ on you add numbers that end with $0$. So it can never be a square number, since the last digits of the square of any number ends with $((\pm 1)^2,(\pm 2)^2,(\pm 3)^2,(\pm 4)^2,(\pm 5)^2)\mod 10=(0,1,4,9,6,5)$.

-
It is further interesting to note, that $3$ and $11$ are always a factor of the sum ($k\geq 3$ in the case $3$ and $k\geq10$ in the case of $11$), due to the fact that $$1!+2!+3!=9 \text{ and } \sum_{k=1}^{10}k!=3^2×11×40787.$$ Every futher addend also shares a $3$ resp. $11$, e.g. $$\begin{eqnarray} 1!+2!+3!+4!+\cdots &=& 3\times (1+2+\frac{4!}{3}+\cdots)\\ (\sum_{k=1}^{10}k!)+11!+ \cdots&=& 11\times(3^2\times40787+\frac{11!}{11}+\cdots) \end{eqnarray}$$ If theses are the only values, is asked here. – draks ... Mar 16 '12 at 14:12

Hint $\rm\ mod\ 5\!:\ \ \mathbb Z^2 \equiv \{0,\: \pm 1,\:\pm2\}^2 \equiv \{0,\: \pm 1\} \not\ni -2 \equiv 1!+2!+3!+4! + 5 N$

-

The following is a brute force approach. We may calculate the sum at $n=21$, and find $$\sum_{k=1}^{21}k!=3^2\cdot 11\cdot 877\cdot3203\cdot41051\cdot4699727.$$

Since $11^2$ divides $k!$ for all $k\geq 22$, this implies that $11$ divides the sum exactly once for all $k\geq 21$, and hence the sum is not a square. For $n\leq 21$, we may check by computer and notice none are squares except $n=3$

-