Or search by topic
Consider numbers of the form
$$ u(n) = 1! + 2! + 3! +...+ n!. $$
b | b2 | Last digit of b2 |
0 | 0 | 0 |
1 | 1 | 1 |
2 | 4 | 4 |
3 | 9 | 9 |
4 | 16 | 6 |
5 | 25 | 5 |
6 | 36 | 6 |
7 | 49 | 9 |
8 | 64 | 4 |
9 | 81 | 1 |
This table shows that the squares of all integers between $0$ and $9$, and therefore all integers, end in either $1$, $4$, $5$, $6$ or $9$.
No perfect squares end in $3$. Therefore, $u(n)$ with $n > 4$ can never be a perfect square as it has been shown to always end in $3$.
All that remains is to find $u(n)$ for all integers of $4$ or less:
Only $u(1)$ and $u(3)$ are perfect squares, and so they are the only sums of factorials to be perfect squares.
How many zeros are there at the end of the number which is the product of first hundred positive integers?
Lyndon chose this as one of his favourite problems. It is accessible but needs some careful analysis of what is included and what is not. A systematic approach is really helpful.