I neglected context. I needed pseudorandom *squarefree* numbers. So, if the random number generator gave a number divisible by a square other than 1, the function would check if the next number was squarefree. This approach could have led to distribution problems favoring odd numbers.