Skip to content

random prime distinct from

Chris Petersen edited this page Oct 21, 2015 · 1 revision

Returns a random prime between the lower bound (inclusive) and upper bound (exclusive), that is not equal to the exclusion.

Parameter Description
lo lower integer bound
hi upper integer bound
p exclusion

Example

> (random-prime-distinct-from 127 300 179)
257
Clone this wiki locally