## number of trial to obtain an outcome

Consider the independent trials each of which results in outcome $i, i = 0,1,...,k$ with probability $p_i , \sum_{i = 0}^{k} p_i = 1.$ Let $N$ denote the number of trials needed to obtain an outcome that is not equal to $0,$ and let $X$ be that outcome.

(a) Find $P(N = n), n \geq 1.$

This is the only one that is really giving me trouble. Here is what I have:

$P(N = n) = \sum_{j = 0}^k P(N = n | X = j)P(X = j)$
$= \sum_{j = 0}^k P(N = n, X = j)$
$= \sum_{j = 0}^k P(N = j)...?$

(b) Find $P(X = j), j = 1,...,k.$

$P(X = j) = p_j$

(c) Show that $P(N = n, X = j) = P(N = n)P(X = j)$

All I need is part (a) and this becomes trivial.

Any help? Thanks.