Over the course of about 12 years , I would periodically sign up for the notification . Today ' s WTF pack was the first notification I ever received . Keep trying , and one day , you too , can be like me and receive your very first WTF pack notification ! <| sep |> Sounds good , and a female would be great . Thanks a bunch . <| sep |> Fat Cobra . <| sep |> Title was more of a joke considering the early game luck , but indeed the RFS was out of luck . <| sep |> Yeah , you made a small mistake there . Line 9 should be curentNumber random . nextIntrange 1 . This results in the following output 0 8997951 8987092 8996093 8998514 9003345 8970836 9012617 9018128 9005029 901044 It actually does handle the case where range 1 is the previous number correctly it ' ll just boil down to random . nextIntrange 1 , as the previous number can ' t occur as the new random number in this case . Also , your last example takes previousNumber 1 % range with twice the probability as any other number . It results in an roughly equal distribution over time , but each individual number isn ' t fair . edit But I see now why the loopapproach was given at first . My approach came pretty naturally to me , so I was dumbfounded why one would use a loop , but apparently it ' s not quite as intuitive in general as i thought . Especially as it includes randomness , which is troublesome for most people according to my school experience .