With integers $n$, of such form that
$$n=n^2 - (n!\mod n^2)$$
Is $n$ always a prime number?
Hint: If $n$ is not prime, then $n!\equiv 0\operatorname{mod}n^2$.
Yes.
If $n > 4$ is composite, then $n! \equiv 0 \bmod n^2$. For $n=4$ the claim does not hold.
Copyright © 2021 JogjaFile Inc.
Hint: If $n$ is not prime, then $n!\equiv 0\operatorname{mod}n^2$.