I think there is an error, the python documentation does not make it as clear as it should.
The difference between the two parameters for jumpahead is 1, which means that you are guaranteed to get only 1 unique value (which happens). if you need more values, you need larger parameters.
EDIT: Further explanation
Initially, as the name suggests, jumpahead just jumped forward in sequence. It is clear that in this case, when a jump of 1 or 2 places forward in the sequence will not lead to independent results. As it turned out, jumping forward in most random number generators is inefficient. For this reason, the python only approaches forward. Since its only exemplary, python can implement a more efficient algorithm. However, the method βpretendsβ to go forward; passing two identical integers will not lead to a completely different sequence.
To get different sequences, you need integers to be passed far apart. In particular, if you want to read a million random numbers, you need to separate your jumps by a million.
As a final note, if you have two random number generators, you only need to go to one of them. You can (and should) leave the other in its original state.
source share