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.

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store