* @unsigned nbits@ = number of bits in the modulus
* @grand *r@ = pointer to random number source
* @unsigned n@ = number of attempts to make
* @unsigned nbits@ = number of bits in the modulus
* @grand *r@ = pointer to random number source
* @unsigned n@ = number of attempts to make