Generate a random number within a range but not in a black list uniformly.