# Perfect square or cube

There is series like $$N = 3! + 4! +\cdots+ 64!$$. It is asked whether it is perfect square or cube . How to identify Whether $$N$$ is perfect square or cube for any big factorial or for sum of factorial ?

• It's not divisible by $4$. Commented Oct 19, 2018 at 19:34
• @LordSharktheUnknown ...but it is divisible by $2$. Slick. Commented Oct 19, 2018 at 19:37

Let us define $$a_n$$ as $$a_n=3!+4!+...+n!$$ Rearrange this sum as $$a_n=3!(1+4+4\cdot 5+4\cdot 5\cdot 6+...+4\cdot5\cdot ...\cdot n)$$ Since $$3!=6$$ is not a perfect square or divisible by a perfect square, in order for $$a_n$$ to be a perfect square, the sum $$1+4+4\cdot 5+...+4\cdot5\cdot ...\cdot n$$ must be divisible by $$6$$. Note that all terms including and after the $$4\cdot 5\cdot 6$$ term are divisible by $$6$$, so the whole sum is divisible by $$6$$ if and only if $$1+4+4\cdot 5$$ is divisible by $$6$$. It is not divisible by $$6$$, so $$a_n$$ cannot be a perfect square.
Of course, this makes the assumption that $$n\ge 6$$, but you can check the cases $$n=3,4,5$$ for yourself since they are only finitely many.