up previous next
RandomNBitPrime    --    Random prime with N bits


Syntax
RandomNBitPrime(N: INT): INT

Description
This function returns a random prime in the range 2^(N-1) and 2^N. The distribution is uniform. N must be between 10 and 31.

Example
/**/ RandomNBitPrime(10);
991

See Also