TITLE: How Wilson's theorem implies the existence of an infinitude of composite numbers of the form $n! + 1$?
QUESTION [1 upvotes]: This is a paragraph in David M. Burton, "elementary number theory, seventh edition:
":

But I do not understand:
1- How Wilson's theorem implies the existence of an infinitude of composite numbers of the form $n! + 1$?
This is the statement of Wilson's theorem that I know:
$P$ is a prime iff $(p-1)! \equiv -1 (mod p)$
Could anyone explain this for me please?
2- I do not understand the second statement in the paragraph, especially in comparison to the first statement, does they mean that the form $n! +1$ can give us prime and composite numbers ?

REPLY [1 votes]: 1) this follows if you also use Euclid's result that there are infinitely many primes, as $(p-1)!+1$ will be composite for each such prime $p$. 
2) Indeed, this implies that while we are sure there are infinitely many $n$ such that $n!+1$ is composite, we don’t know if there are infinitely many $n$ for which it’s prime. In other words if $n-1$ is not prime, this doesn’t necessarily imply that $n!+1$ is prime.
{"set_name": "stack_exchange", "score": 1, "question_id": 3237764}