the required mass function for the above case is: $p_1 p_2 (1-p_3) + p_1 (1-p_2) p_3 + (1-p_1) p_2 p_3$ The above reduces to the binomial if the probabilities $p_i$ are all identical. In the general case, you will have ${k \choose n}$ terms where each term is unique with a