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