Subjects number theory

Factorial Sum Square

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Factorial Sum Square


1. **State the problem:** We need to find all pairs of positive integers $(n,m)$ such that the sum of factorials from $1!$ to $n!$ equals a perfect square $m^2$, that is, $$1! + 2! + 3! + \cdots + n! = m^2.$$ 2. **Calculate the sum for small values of $n$:** - For $n=1$: $1! = 1$ which is $1^2$, a perfect square. - For $n=2$: $1! + 2! = 1 + 2 = 3$, not a perfect square. - For $n=3$: $1 + 2 + 6 = 9$, which is $3^2$, a perfect square. - For $n=4$: $1 + 2 + 6 + 24 = 33$, not a perfect square. - For $n=5$: $33 + 120 = 153$, not a perfect square. - For $n=6$: $153 + 720 = 873$, not a perfect square. - For $n=7$: $873 + 5040 = 5913$, not a perfect square. 3. **Examine behavior for larger $n$:** Since factorial grows very quickly, for $n \\geq 5$, $n!$ is divisible by $10$ (because $5!$ and above include factors 2 and 5) and the sum quickly grows large and less likely to be perfect squares. 4. **Check the difference between consecutive sums:** The sum $S_n = \sum_{k=1}^n k!$. Note $S_n = S_{n-1} + n!$. For $n > 3$, factorial grows too fast and the incremental increase $n!$ makes it impossible for $S_n$ to match a perfect square exactly. 5. **Mathematical intuition:** Only small $n$ values yield perfect squares for $S_n$. We have found two pairs: - $(n,m) = (1,1)$ because $1! = 1 = 1^2$ - $(n,m) = (3,3)$ because $1! + 2! + 3! = 9 = 3^2$ 6. **Final answer:** The pairs of positive integers $(n,m)$ are $(1,1)$ and $(3,3)$ only. Therefore, the number of such pairs is 2.