3

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.

MathsLearner
  • 1,339

2 Answers2

4

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

iamwhoiam
  • 1,191
0

I will elaborate on @iamwhoiam's answer. Note that the last digit of a square number $m^2$ lies in $\{0,1,4,5,6,9\}$, as it's completely determined by the last digit of $m$. If $n \ge 5$, then $5! = 120$ divides $n!$, so we have: $$ \forall\, n \ge 4 \colon S_n \in S_4 + 120 \cdot \mathbb{N} $$ As you've calculated, $S_4 = 33$ and by the above the last digit of $S_n$ is $3$ for all $n \ge 4$.