random prime distinct from - part-cw/lambdanative GitHub Wiki

(random-prime-distinct-from lo hi p)

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