2022 SSMO Team Round Problems/Problem 8

Problem

A frog is at $0$ on a number line and wants to go to $9$. On each turn, if the frog is at $n$, the frog hops to one of the numbers from $n$ to $9$, inclusive, with equal probability (staying in place counts as a hop). It is then teleported to the largest multiple of $3$ that is less than or equal to the frog's position. The expected number of hops it takes for the frog to reach $9$ can be expressed as $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.

Solution