[Divisibility of numbers. General properties]  $[$ Prime numbers and their properties ]

Find all natural numbers $n$ such that the number $(n-1)!$ does not divide $n^2$.

#
Clearly, $n=p$ and $n=2 p$ for a prime $p$ satisfy the condition, since $(n-1)!$ does not divide $p^{2}$.

It is also easy to see that 7! and 8! cannot divide $8^{2}$ and $9^{2}$, respectively.

We will prove that for other $n$, the number $(n-1)!$ is divisible by $n^{2}$. Let $n$ have at least two distinct prime divisors. Among the numbers $1, \ldots, n-1$, there are at least $n / p-1$ numbers that are multiples of $p$. If a prime number $p$ appears in the factorization of the number $n$ with power $k$, then ${ }^{n} / p-1 \geq 2 p^{k-1}-1 \geq 2^{k}-1 \geq 2 k-1$. If $n$ does not have the form $2 p$, then at least one of the written inequalities is strict. Therefore, ${ }^{n / p}-1 \geq 2 k$ and $(n-1)!$ is divisible by $p^{2 k}$. Since this is true for all $p$, $(n-1)!$ is divisible by $n^{2}$.

Now let $n=p^{k}$. Then $n / p-1=p^{k-1}-1$. For $p \geq 5$, or $p=3$ and $k \geq 3$, or $p=2$ and $k \geq 5$, this number is not less than $2 k$. Therefore, $(n-1)!$ is divisible by $n^{2}$.

The case $n=16$ is considered directly.

## Answer

8, 9, as well as numbers of the form $p$ and $2 p$, where $p$ is a prime.