Factorial Prime

Author

Eric W. Weisstein
July 26, 2016

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/FactorialPrime.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/FactorialPrime.html.

©2016 Wolfram Research, Inc. except for portions noted otherwise

n!-1 is Prime

A002982

http://www.primegrid.com/primes/primes.php?project=FPS&factors=+&only=ALL&announcements=ALL

http://prpnet.primegrid.com:12002/user_primes.html

http://prpnet.primegrid.com:12002

http://primes.utm.edu/top20/page.php?id=30

l={3,4,6,7,12,14,30,32,33,38,94,166,324,379,469,546,974,1963,3507,3610,6917,21480,34790,94550,103040,147855,208003};

TextGrid[MapIndexed[{#2[[1]],#,IntegerLength[#!-1]}&,l],Alignment->Decimal,Dividers->All]

Do[
Print[{i,l[[i]],IntegerLength[l[[i]]!-1],TimeConstrained[PrimeQ[l[[i]]!-1],3600]//Timing}],
{i,Length[l]}]

n!+1 is Prime

l={1,2,3,11,27,37,41,73,77,116,154,320,340,399,427,872,1477,6380,26951,110059};

TextGrid[MapIndexed[{#2[[1]],#,IntegerLength[#!-1]}&,l],Alignment->Decimal,Dividers->All]

Do[
Print[{i,l[[i]],TimeConstrained[PrimeQ[l[[i]]!+1],3600]//Timing}],
{i,Length[l]}]