#!/usr/bin/env python3 import math # first prime less than $2^{32}$, IOW, closest p=4294967291 # 0xfffffffb # modulo inverse exist for any divisior, since any divisior