How can I create a random integer n in Java, between 1 and k with a "linear descending distribution", i.e. 1 is
n
1
k
Let me try another answer too, inspired by rlibby. This particular distribution is also the distribution of the smaller of two values chosen uniformly and random from the same range.