Fast Modular Factorial?

Hal hfinney at shell.portal.com
Fri Sep 23 16:06:09 PDT 1994


I find that for the numbers I have tried, that (p-1)! mod p = (p-1) if
p is prime, else it equals 0, with one exception (p=4).  So if this
is true (probably a standard result; it sounds familiar) then it might
actually be easier to find the factorial of a larger number mod a
prime than a smaller one.
Hal






More information about the cypherpunks-legacy mailing list