So, for example, after January 23rd anyone can get the exact number of shares traded in Apple on the NYSE on January 21st, take the natural log, discard the first six digits after the decimal point, and keep the next six digits as a random number from 0 to 10^6-1 inclusive.
That's not necessarily evenly distributed so it doesn't necessarily meet all your criteria, but other than that, is it the sort of thing you mean?
The first is easy to solve. Get a result that's sufficiently fine-grained and in the range [0,1). Then scale up by X and round up.
You can add randomness by pushing your number through a cryptographic hash function and treating the result as a binary number in the range [0,1).
{ x : a < x && x < b } <=> (a,b)
{ x : a <=x && x < b } <=> [a,b)
{ x : a < x && x <=b } <=> (a,b]
{ x : a <=x && x <=b } <=> [a,b]
In the example above the questioner is asking about getting a number in the range 1 to X inclusive. That would be [1,X]. Random number generators can return numbers in the range 0 to 1, including 0, not including 1. You can write that as [0,1).If you want an integer n in [1,X] and you get reals r [0,1), you can create a function:
f : [0,1) -> [1,X], f(r) = 1+floor(X*r)
Always check the endpoints, and the expected frequencies.