[OFF TOPIC MATHS QUESTION] - Random Numbers

@david.wylie

Notwithstanding concerns about the RNG implementation, this is my last try, I swear.

random.sample(range(1000000, 10000000), 500001)[500000]

This selects the 500,000th element from a range of random non-duplicating integers, between 1M and 10M (population size is 500001).

It takes about .5 seconds on my computer.

Used in conjunction with setting the seed, you’d have a predictable and fairly memory-efficient way of getting the desired number (I think).

This was a wonderful distraction…