It's not a question of hard and fast limits. I'm not suggesting some guarantee that the number 3 will show up exactly 47 times, no more, no less. That's not what I'm saying.
I'm talking about general statistically random distribution.
For example, let's say you build the function so that you pass it the low end, the high end, and the number of numbers you want returned like this:
function get_number_list(low,high,quantity) { }
And that function will return a number of numbers and you want to favor the low numbers. That's fine, but it doesn't answer the question of how MUCH you want to favor the low numbers.
For example, if you run the function and ask for low=17, high=36, and quantity=1000, what are the odds that the number should be a 36? Since there are 20 numbers in this particular range, if the numbers were all evenly distributed, you would see the number 36 about 50 times roughly. (About 50 out of the 1000 numbers would be a 36 which means that each number has about a 5% chance of being picked.) Or put another way, in an even distribution, 5% of the numbers will be a 17, and 5% of the numbers will be an 18, etc. all the way up to 36.
But you're saying you don't want that. You want the low numbers to appear in the list more often.
And that's fine, but it doesn't tell us HOW MUCH more often they should come up. Instead of an even distribution like this:
Lower numbers ------ up to the higher numbers -->
5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5%
Do you want a sharp favor of the low numbers like this?
80% 10% 5% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1%
Or do you want a more gradual favoring of the lower numbers like this:
30% 15% 10% 5% 5% 5% 4% 4% 4% 2% 2% 2% 2% 2% 2% 2% 1% 1% 1% 1%
The answer to that question dictates the slope (or steepness) of the curve of the function that we will use to make sure that low numbers are favored over higher numbers.