Find the sum of all perfect square that can be expressed as form $m!+2016$ .

If you think that no perfect square satisfies this condition, or there are infinitely many perfect squares that satisfy this condition, submit your answer as 999.

**
Notation
**
:
$!$
denotes the
factorial
notation. For example,
$8! = 1\times2\times3\times\cdots\times8$
.

The answer is 7056.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

We consider two cases.

Case 1: $m \leq 7$ .This gives us $8$ cases to check and shows the only solution to be $7!+2016=7056=84^2$ .

Case 2: $m \geq 8$ .$m \geq 8 \implies 64 \vert m! \implies m!=64 k \quad k \in \mathbb{N} \quad \quad \color{#3D99F6}{\text{As } (2 \times 4 \times 8) \vert 8!}$

$m!+2016=64k+2016=16(4k+126)=\left (4^2 \right) \left (4k+126 \right) \implies 4k+126=n^2 \quad n \in \mathbb{N}$

We know $n^2 \equiv 0 \text{ or } 1 \pmod{4}$ but $4k+126 \equiv 2 \pmod{4}$ which is a contradiction so there are no solutions $m \geq 8$ .

This means the only solution is $m=7$ giving the sum of the perfect squares as $\color{#20A900}{\boxed{\boxed{7056}}}$