Wikipedia: Algebraic derivation of mean says:

$\displaystyle {E}(X) = \sum_k x_k \cdot Pr(x_k) = \sum_{k=0}^n k \cdot Pr(X=k)$

Sure, $\displaystyle X$ is "a discrete random variable", but does that inevitably mean that $\displaystyle x_k = k$? Couldn't $\displaystyle x_k$ all be, say, multiples of 3 ($\displaystyle x_2 = 6$)?

And in next step they use this to saywhich is an essential part of proving that if $\displaystyle X\sim(n,p) \Rightarrow E(X)=np$ (which is why I'd like to understand why should $\displaystyle x_k = k$).The first term of the series (with indexk= 0) has value 0 since the first factor,k, is zero.