Solving the recurrence $g(n)=g(n-1)\left(1+\frac{1}{n}\right)+\left(1+\frac{1}{n}\right)$ with $g(0)=0$

174 Views Asked by At

I ran across the following math puzzle: a mouse is on a circle with circumference of 100 units and every turn he walks on the circle a unit of 1 after every turn the circle is increased by 100 units (evenly distributed) will the mouse ever reach the end.

To solve this, I came up with the following distance equation for the mouse:

$$g(n)=g(n-1)\left(1+\frac{1}{n}\right)+\left(1+\frac{1}{n}\right)$$

$$g(0)=0$$

How does one go about solving this equation?

2

There are 2 best solutions below

0
On BEST ANSWER

Hint.

$$ ng_{n+1}=(n+1)g_n+n+1\Rightarrow \frac{g_{n+1}}{n+1} = \frac{g_n}{n}+\frac 1n $$

now calling $f_n = \frac{g_n}{n}$ we have

$$ f_{n+1} = f_n +\frac 1n $$

for $n > 0$

3
On

Starting from @Cesareo's answer $$f_{n+1} = f_n +\frac 1n \implies f_n=\psi (n)+\gamma+c$$ where appears the digamma function. So

$$g_n=n\left(\psi (n)+\gamma+c \right)$$ but the condition should be something else than $g_0=0$.

If it is $g(1)=0$, then $c=0$.