<s>[INST] 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 ?
 [/INST] 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$.
</s>