Divisibility between factorials and squares

50 Views Asked by At

Is there any condition for a positive integer $n$ such that $n!$ is divisible by $n^2$? I have tried using Wilson's theorem, but to no avail. Any ideas?

1

There are 1 best solutions below

0
On BEST ANSWER

$n!$ will be divisible by $n^2$ if and only if $n$ is not prime or a square of a prime.

This is because if $n$ is not prime or a square of a prime, then there exists some pair of divisors $a,b$ of $n$, that is $a\cdot b=n$. Because $n$ is not a square of a prime, we know that $a\neq b$ and can assume that $a<b$.

Then, $$n!=1\cdots (a-1)\cdot a \cdot (a+1)\cdots (b-1)\cdot b\cdot (b+1)\cdots n = a\cdot b\cdot n \cdot k = n^2\cdot k$$ where $k$ is some integer we don't really care about.