p
is
prime
precisely when
p
divides (
p
-1)!+1
-
(2-1)!+1 = 1!+1 =
2
-
(3-1)!+1 = 2!+1 =
3
-
(4-1)!+1 = 3!+1 = 7
-
(5-1)!+1 = 4!+1 = 25 =
5
*5
-
(6-1)!+1 = 5!+1 = 121 = 11*11
-
(7-1)!+1 = 6!+1 = 721 =
7
*103
-
(8-1)!+1 = 7!+1 = 5041 = 71*71
-
(9-1)!+1 = 8!+1 = 40321 = 61*661
-
(10-1)!+1 = 9!+1 = 362881 = 19*71*269
-
(11-1)!+1 = 10!+1 = 3628801 =
11
*329891
-
(12-1)!+1 = 11!+1 = 39916801
-
(13-1)!+1 = 12!+1 = 479001601 =
13
*13*2834329
-
(14-1)!+1 = 13!+1 = 6227020801 = 83*75024347
-
(15-1)!+1 = 14!+1 = 87178291201 = 23*3790360487
-
(16-1)!+1 = 15!+1 = 1307674368001 = 59*479*46271341
-
(17-1)!+1 = 16!+1 = 20922789888001 =
17
*61*137*139*1059511
-
(18-1)!+1 = 17!+1 = 355687428096001 = 661*537913*1000357
-
(19-1)!+1 = 18!+1 = 6402373705728001 =
19
*23*29*61*67*123610951
-
(20-1)!+1 = 19!+1 = 121645100408832001 = 71*1713311273363831
-
etc