That's a really tricky problem to solve, and similar to one that had me stumped for a good while on one of my builds shown above.
I've covered the method I used to get around this in the 'Finding a solution' section of my linked blog post above:
https://community.articulate.com/articles/dynamic-elearning-with-random-number-variables?page=1#comment-88171Although my method won't directly solve your problem I hope it might give you some ideas. The one area I think you will need to think differently is that you'll want to continually update whether the True/False variables that I discuss are set to True or False, depending on the last number to be generated. This will prevent numbers being drawn twice in succession but will allow them to be drawn again out of succession (if that makes sense?!).