First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 3 years ago

Max Alekseyev gravatar image

The given conditions imply that k0 and j are simply the remainder and quotient of division of k by p-1. Correspondingly, they can be computed as:

j, k0 = k.quo_rem(p-1)