I have a number (48000)
I want to be able to generate a list of positive integer numbers (within a min/max range) that this number can be divided by that will guarantee a result that is a whole number.
Here are some examples:
Given the dividend 48000, 50 is a divisor that returns a result that is a whole number:
48000/50 = 960
Whereas 51 is a divisor that returns a result that is a fraction:
48000/51 = 941.1764706
So my question is; is there a form of rounding I could apply to a dividend/divisor pair that will round the divisor to the nearest number that will result in a whole number outcome?
For example:
Given the dividend 48000
Apply the rounding method on the divisor 50 results in 50.
Apply the rounding method on the divisor 51 also results in 50.
Apply the rounding method on the divisor 52 also results in 50.
...
Apply the rounding method on the divisor 59results in 60.
Apply the rounding method on the divisor 60 also results in 60.
Apply the rounding method on the divisor 61 also results in 60.
You can factor the number and use that to easily make a list of divisors. In your example $48000=2^6\cdot 3 \cdot 5^3$ and your list of divisors includes $\ldots 40,48,50,60,64 \ldots $. Given a number not in the list you can compute the distance to the two neighbors and choose the closer. You need to decide what to do when they are equidistant from the two neighbors, like $55$. I don't think there is a name for it, but it is a defined algorithm.