Given the discrete ODE: $$\dot{\rho}_n(t) = -g \,\rho_n(t) + g\,\rho_{n-1}(t)$$
I'm advised solving this with a generating function $G(s,t) = \sum_{n=0}^{\infty} s^n\,\rho_n$
It should hold: $\sum_{n=0}^{\infty}s^n\,\rho_{n-1} = G(s,t)\cdot s+ \rho_{-1}$ thus by substituting into the ODE:
$$\dot{G} = -g\,G+ g\,s\cdot G + g\,\rho_{-1}$$
Solving brings:
$$G = {C}\,e^{\textstyle (g\,s-g)\,t} + \dfrac{g\,\rho_{-1}}{(g\,s-g)}$$
However something feels utterly weird about this. Also I have no clue how this helps with finding $\rho_n(t)$. Just as little how to incorporate the initial condition $\rho_n(0) = \delta_{n0}$
Using the Laplace transform
$$ (s+g)\hat \rho_n(s) = \hat \rho_{n-1}(s)+\rho_n(0) = \hat \rho_{n-1}(s)+\delta_{n,0} $$
so
$$ \hat \rho_n(s) = \left(\frac{g}{s+g}\right)^n \Rightarrow \mathcal{L}^{-1} [\hat \rho_n(s)] = \frac{g^n t^{n-1}}{(n-1)!}e^{-g t} $$
NOTE
Regarding the generating function method, a hint:
$$ e^{(-g+gs)t} = e^{-gt}e^{g s t} = e^{-g t}\sum_k\frac{g^kt^k}{k!}s^k = \sum_k\left(e^{-g t}\frac{g^kt^k}{k!}\right)s^k $$
Defining $G(s,t) = \sum_{n=1}^{\infty}\rho_n(t)s^n$ we have
$$ \frac{\partial}{\partial t}G = -g G + g s G\Rightarrow G(s,t) = C e^{-g t}e^{s g t} $$
now, as $G(s,0) = 1$ follows $C=1$ so $G(s,t) = e^{-g t}e^{s g t}$