Solution: Claim: \(n \not \mid (n-1)!\) if and only if \(n\) is prime or \(4\)
Proof: \((\Leftarrow)\)
- \(4 \not \mid 3! = 6\).
- If \(p\) is prime, then \(p \not \mid k\) for \(k < n\), therefore \(p \not \mid (n-1)!\)
\((\Rightarrow)\) If \(n = 1\) then \(1 \mid 0! = 1\) so \(1\) is not in our set. The numbers less than \(6\) are all accounted for (either primes, \(4\) or \(1\)), so let \(n\) be a composite number larger than \(6\), ie \(n = ab\). Suppose first \(a \neq b\) then \((n-1) = 1 \cdots a \cdots b \cdots (n-1)\) so \(n \mid (n-1)!\). Suppose instead that \(a = b\), then \(n = a^2\). Since we know \(a \geq 3\) we must have \(1 \cdots a \cdots (2a) \cdots (a^2-1)\) so \(a^2 \mid (n-1)!\) and we're done.