TITLE: Number Theory: $p!+p=n^2$, $p$ = prime
QUESTION [9 upvotes]: Find all prime numbers $p$ such that $p!+p$ is a perfect square.
I think the only ones are when $p!+p=p^2$, i.e. $p\in \{2,3\}$.
Any ideas at all?

REPLY [3 votes]: First let $p>3$ and now for all primes $q<p$ we've $(\frac{p}{q})=1$. Now as $(\frac{q}{p})(\frac{p}{q})=(-1)^{\frac{p-1}{2}\frac{q-1}{2}}$ and $p \equiv 1 \pmod 4$ so, $(\frac{q}{p})=1$ for all primes $q<p$ and that implies $(\frac{n}{p})=1$ for all $n<p$ but that's the contradiction since there is $\frac{p-1}{2}$ non residues. So $p=3$