It is a geometric distribution that is based on the binomial distribution and a single Bernoulli trial. The binomial distribution computers the probability of getting X successes in N throws. The geometric distributions says "After X-1 throws, what is the probability that I will get a success on the Xth throw?" So it is a P(X-1 throws with no successes AND Success on the Xth throw).
Armed with this do you think you can figure out what the function would be?