Calculates probabilities for the number of trials needed to get the first success in Bernoulli trials.