in reply to Simple primality testing

If I want a small random prime, I do
my $random_prime = [17, 23]->[int rand 2];
After all, if math professors need a prime number for an example, 95% of them pick either 17 or 23.

Replies are listed 'Best First'.
Re^2: Simple primality testing
by ambrus (Abbot) on Jun 19, 2009 at 06:01 UTC

    I thought the canonical example prime number was 91.

      No, no, no, that's the "hard to factor" product of two random primes.