Find all $n≥1$ natural numbers such that : $n^{2}=1+(n-1)!$ Problem :
Find all $n≥1$ natural numbers such that : $n^{2}=1+(n-1)!$
My try : 
$n=1$ we find : $1=1+1$ $×$ 
$n=2$ we find : $4=1+1$ $×$ 
$n=3$ we find : $9=1+2$ $×$ 
$n=4$  we find : $16=1+6$ $×$
$n=5$ we  find : $25=1+24$ $√$ 
Now how I prove $n=5$ only the solution ?
 A: Hint If $n \geq 6$ then 
$$1+(n-1)!  \geq 1+2 \cdot 3 \cdot (n-2) \cdot (n-1)$$
Show that 
$$2(n-1) \geq n \\
3(n-2) \geq n$$
for $n \geq 6$.
A: We have already proved by inspection that $n=1,2,3,4$ are not solutions and $n=5$ is a solution, then for $n>5$ we have
$$n^{2}=1+(n-1)! \iff n^2-1=(n-1)!\iff n+1=(n-2)!\iff n=(n-2)!-1$$
and therefore it suffices to prove by induction 
$$n<(n-2)!-1$$
and we have


*

*base case: $n=6 \implies 6<4!-1$

*induction step: assume $n<(n-2)!-1$ we need to prove


$$n+1<(n-1)!-1$$
which is true indeed
$$n+1\stackrel{\text{Ind. Hyp.}}<(n-2)!-1+1=(n-2)!\stackrel{\text{?}}<(n-1)!-1$$
and the latter is true indeed
$$(n-2)!<(n-1)!-1$$
$$(n-2)!<(n-1)(n-2)!-1$$
$$(n-1)(n-2)!-(n-2)!-1>0$$
$$(n-2)(n-2)!-1>0$$
which is true for any $n\ge3$.
A: $n^2 = 1 + (n-1)!$
$n^2 -1 = (n-1)!$
$(n-1)(n+1) = (n-1)!$ (If we assume $n>1$)
$n+1 = \frac {(n-1)!}{n-1} = (n-2)!$.
$n-2 + 3 = (n-2)!$ (If we assume $n > 2$)
$1 + \frac {3}{n-2} = \frac {(n-2)!}{n-2} = (n-3)!$ is an integer.
So $n-2|3$.  But $3$ is prime.  So either $n-2=1$ or $n-2 = 3$.  But we assume $n > 2$ so $n=5$.
.... But to be thourough we have to consider $n \le 2$ ....
A: If $n\ge 6$, dividing $n^2-1=(n-1)!$ by $n-1$ we get 
$$n+1=(n-2)!\ge(n-2)(n-3)(n-4)=n^3-9n^2+26n-24$$
Define
$$\begin{align}f(n)&=n^3-9n^2+25n-25\\
&=(n-5)(n^2-4n+5)\\
&=(n-5)((n-2)^2+1)\end{align}$$
and $f(n)>0$ for $n\ge 6$.
A: A more thorough version of the answer given by fleablood, avoiding assumptions and unexamined cases.
The stated question, find all solutions for $n$ such that $n^2=(n-1)!+1$
Since for all non-negative integers, $k!\ge 1$, we conclude $n^2\ge 2 \Rightarrow n>1 \Rightarrow (n-1)>0$
Rearranging, $(n-1)!=n^2-1=(n-1)(n+1)$
Restating, $(n-1)(n-2)!=(n-1)(n+1)$
Since $(n-1)>0$, we are allowed to divide through by $(n-1)$ and obtain $(n-2)!=(n+1)$. And since $n>1 \Rightarrow n+1 > 2$, the largest integer in the factorial must be at least as large as $2$, viz: $n-2 \ge 2$
Therefore $n-2$ must have at least one divisor $d>1$. But $d\mid (n-2) \Rightarrow d\mid (n-2)! \Rightarrow d\mid (n+1)$
Any factor which divides each of $(n-2)$ and $(n+1)$ must divide their difference, $(n+1)-(n-2)=3$
The only factor greater than $1$ which divides $3$ is $3$ itself, and since $(n-2)$ has no other common factors with $(n+1)$, it must be the case that $n-2=3 \Rightarrow n=5$ is the sole solution to the stated problem.
