Let's play a game. First, you pay me $n$ dollars, and then you flip a fair coin $n$ times to product a sequence of heads and tails in the set $\{H, T\}^n$. For every triple of three consecutive equal entries in your sequence I pay you $V_n$ dollars. For what value of $V_n$ is this game completely fair?
Now let's change the rules a little bit. First, you pay me $n$ dollars, and then you roll a fair $d$-sided die $n$ times to produce a sequence in the set $\{1, 2, \hdots, d\}^n$. Fix $k \geq 2$, and for every subsequence of $k$ consecutive equal entries in your sequence I pay you $V(n, d, k)$…