How to test if $n!+1$ is prime or not?

132 Views Asked by At

For $n=0,1,2,3,11,27,37,41,73,77,116,154,320,340,399,427,872,1477,6380,26951,...,$ $n!+1$ is prime. But how can you prove that this is always the case? Especially for the larger ones.

For example $1477!+1$ this number has several hundert digits, I know we can apply stochastic factor or prime algorithms, but how can you do the final proof without testing all factors?