Natural numbers for which $n!+1$ is prime

102 Views Asked by At

I was given the following problem:

Generate a sequence of n consecutive composite numbers.

The answer was $$(n+1)!+2,(n+1)!+3,(n+1)!+4,...,(n+1)!+n+1$$

However I was thinking if we could simplify the answer a bit by knowing for which numbers $n!+1$ is prime or composite.

By putting values I got that it is prime for $n=1,2,3,11$

How do I proceed?