Simplified random number algorithm