View Single Post
Old 2021-08-23, 02:06   #887
Zhangrc
 
"University student"
May 2021
Beijing, China

1768 Posts
Default

... if LL and PRP tests become as easy as this:
Code:
def LL(p):
    x = 4
    for i in range(1, p-1): x = pow(x, 2, 2**p - 1) - 2
    return x

PRP = lambda p: pow(3, 2**p - 2, 2**p - 1)

Last fiddled with by Zhangrc on 2021-08-23 at 02:07
Zhangrc is offline   Reply With Quote