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
This is called a triangular distribution, although yours is a degenerate case with the mode equal to the minimum value. Wikipedia has equations for how to create one given a uniformly distributed (0,1) variable.