Lucas 定理 对质数 p 有 (mn)modp=(⌊m/p⌋⌊n/p⌋)(mmodpnmodp)modp. Wilson 定理 (p−1)!modp=⎩⎨⎧−1,2,0,p∈Pp=4otherwise.