Suppose that we roll a die until a 6 comes up.
Using linearity of expectation, define indicator random variable $X_K$ to be 1 if X≥K and 0 otherwise.
Argue that $X=∑_KX_K$ so that $E[X]=∑_KE[X_K]$. Calculate the expectation of each term $E[X_K]=Pr[X≥k]$. Then simplify.
Example where X = 10. $∑_KX_K$ will equal 10 because $X_K$ will be 1 for all of the values less than or equal to 10. More generally, for any value X, $X_K$ will be 1 for all of the values less than or equal to X so the sum of all $X_K$ equals X.
How do I get the probability that X $\ge$ K?
$\mathsf P(X\geq k)$ is the probability that the first six occurs on or after roll $K$.
Thus that is the probability for $k-1$ consecutive rolls of not-sixes.
Exactly.
So because you know that $\mathsf E(X_k)=\Pr(X\geq k)$, therefore $\mathsf E(X)~{=\sum_{k=1}^\infty (5/6)^{k-1}\\ = \sum_{j=0}^\infty (5/6)^j}$
And you should be familiar with that named series.