Find all positive integers $m$ and $n$ such that $\sum_{k=1}^m{k!}=n^2$.

elementary-number-theory

Find all positive integers $m$ and $n$ such that
$$\sum_{k=1}^m{k!}=n^2.$$
The only pair I have got so far is $(m,n)=(3,3)$.

I noticed that $n$ is odd and is a multiple of $3$, and I tried $\bmod 4,\bmod 8, \bmod 9$ but nothing happened. Actually I want to conjecture that $\exists m_0$ such that there will be no square values for LHS after this, but I don't know how to prove this.

Are there any methods to solve this? Thanks.

Best Answer

As you've noted, if $m\ge4$ the sum is $3$ more than a multiple of $5$. You're right, that can't be square: the only allowed residues are $0,\,1$.

Related Question