I just tested our friend's example.
But if I put random (0,100) and the first result is 56 per example, only numbers will be generated below that, I lose the rest of the numbers.
Yeah, but the 56 itself is random... It's just an anchor from which all numbers are created. You're not "losing" anything, it's just that randomness picked them out that time.
bruno's example would fail if z ended up being 0. Also it could still give three consecutive numbers.
You're right, I missed that. Sorry.