# Summation of factorials is a perfect square number

Find the values of n for which 1! + 2! + 3! + ... + n! is the square of a natural number.

My attempt : I tried to find the summation of factorials upto n terms. Let the summation of first n factorials be $S_n$ $$S_1=1$$ $$S_2=3$$ $$S_3=9$$ $$S_4=33$$ I could not find any generic way to find $S_n$ from this data points. Please help me.

Hint: Consider the last digit of $S_n$ for $n \geq 4$. What do you observe? Can the number ever be a perfect square?