I noticed that $1!^3=1$ and $1!^3+2!^3=9$ are both perfect squares.

$1!^3+2!^3+3!^3=225=15^2$ is also a perfect square and even if $n>5$, it does end on $9$, so I think that $1!^3+2!^3+3!^3+…n!^3$ can be a perfect square.

Can $1!^3+2!^3+3!^3+…n!^3$ be a perfect square when $n>3$?


1 Answer 1


The first thing you should think of when you see such a problem is that $n! \equiv 0 \pmod{k}$ for all $n \geq k$. This means that $S_n = \sum_{i = 1}^n (i!)^3$ is eventually constant modulo $p$, and we just need to investigate whether $S_n \pmod{p}$ "ends" at a quadratic nonresidue modulo $p$. Through a small Python script, we get that $p = 11$ works for our purpose. That is,

\begin{align*} S_1 &= 1 \\ S_2 &= 9 \\ S_3 &= 225 \\ &\vdots\\ S_9 &= 47850402559694049 \equiv 7 &\pmod{11} \\ S_{10} &= 47832576242431694049 \equiv 6 &\pmod{11} \\ S_{11} &= 63649302669112063694049 \equiv 6 &\pmod{11} \\ S_{11 + k} &\equiv 6 &\pmod{11} \end{align*}

From here, simply note that $6$ is a quadratic nonresidue modulo $11$, so none of $S_n$ (for $n \geq 11$) is a square. You can check $S_4$ to $S_{10}$ manually (Euler style) that they are not squares.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .