If I wanted to have a die that rolled, for example:
| Roll | Prob (in %) |
|------|-------------|
| 1 | 60 |
| 2 | 25 |
| 3 | 12 |
| 4 | 4 |
| 5 | 1 |
| 6 | 0.2 |
| 7 | 0.04 |
| ... | ... |
(These numbers are off the top of my head, and don't necessarily follow a simple algorithm)
What kinds of algorithms can I programmatically describe such that I could roll any1 number with exponentially decreasing odds?
I was thinking that if I just generated a table of probabilities using an exponential curve I wouldn't be able to guarantee my function resolves; If I started at the 1 roll and had a few failures in a row, I might never have a succeeding roll; and I can't start at the other end at work my way towards a roll of 1 with a probability of 100%, because it's infinitely long and there is no end to start at2.
So how can I pick a number from this distribution? If possible, the distribution should exponentially or quadratically decay, but any distribution that could conceivably model something like:
1. The number of rooms in a house
2. The number of items in a treasure chest
3. The number of eyeballs on a mutant
A final but not necessary point of consideration would be the ease of which the algorithm can be modified to stretch/shorten the curve, to make low numbers less/more likely.
1: Barring computer precision; a roll of MAXINT or whatever would be the practical maximum
2: Again, in practice a computer could do it because there is a smallest float for the probability to be, but that would be horribly inefficient. The average case would take billions of rolls, whereas a good algorithm could probably do it in O(1) by just picking some fraction and resolving it.

These probabilities are described by a Geometric Distribution. For that one, the probability of outcome $n$ is given by: $$P(X = n) = (1-p)^{n-1}p$$ where $p$ is the "exponential rate".
To sample from this distribution (or other ones for that matter) you can do the following. You choose from a uniform $[0,1]$ random variable and then look at the inverse value of that outcome through the CDF. The CDF for this distribution is $$P(X \leq n) = 1 - (1-p)^n$$ So here you would find the first $n$ s.t. that function is greater than the uniform outcome you chose.