How many tries on average before I see the same value $N$ times in a row? If I repeatedly roll a fair, $X$-sided die, on average how many rolls should I expect to make before I happen to roll the same value $N$ times in a row?
I've found questions on here with answers when $X=2$, or where $N=2$, or where you're looking for a specific result $N$ times in a row; I'm interested in the situation where I don't care what the specific value is, I just want it to be $N$ times in a row. The closest I can find is Suppose we roll a fair $6$ sided die repeatedly. Find the expected number of rolls required to see $3$ of the same number in succession., but I can't quite figure out how to generalize it beyond $N=3$.

$N_1$ - No of tosses for 1st Heads
$N_2$ - No of tosses for 2 consecutive Heads
$N_3$ - No of tosses for 3 consecutive Heads
$\mathbb E[N_1] = 2$
$\mathbb E[N_2] = (1+\mathbb E[N_1])2 = 6$
$\mathbb E[N_3] = (1+\mathbb E[N_2])2 = 14$
A general formula can be created
$\mathbb E(1) = X$
$\mathbb E(2) = (X+1)X$
$\mathbb E(3) = \big((X+1)X+1\big)X$
and so on.

$$\mathbb E(N) = \sum_{i=1}^N X^i = \frac{X(X^N-1)}{X-1} $$

I have made a video explanation and made a simple formula at the end
https://youtu.be/d72rcsBblRE
