nthroot_mod, powermod, jacobi symbol