2022 SSMO Team Round Problems/Problem 8
Problem
A frog is at on a number line and wants to go to
. On each turn, if the frog is at
, the frog hops to one of the numbers from
to
, inclusive, with equal probability (staying in place counts as a hop). It is then teleported to the largest multiple of
that is less than or equal to the frog's position. The expected number of hops it takes for the frog to reach
can be expressed as
, where
and
are relatively prime positive integers. Find
.