Finding the sum of Arithmetico-geometric series It was asked to find the sum of the AGP series $\left\{\dfrac{e^{\frac{1}{k}}+2 e^{\frac{2}{k}}+3 e^{\frac{3}{k}}+\cdots+k e^{\frac{k}{k}}}{k^2}\right\}$
I tried solving it with the formula for sum of $n^{th}$ terms of AGP series $\frac{a-[a+(n-1) d] r^n}{1-r}+\frac{d r\left(1-r^{n-1}\right)}{(1-r)^2}$ but my answer is not matching with the given solution.
The solution of this series was given as $-\dfrac{e^{\frac{1}{k}}(e-1)}{\left(e^{\frac{1}{k}}-1\right)^2}+\dfrac{k e^{1+ \frac{1}{k}}}{e^{\frac{1}{k}}-1}$
Thanks for any help.
 A: Let $S_k=e^{\frac{1}{k}}+2e^{\frac{2}{k}}+\cdots+ke^{\frac{k}{k}}$, then
$e^{-\frac{1}{k}}S_k=1+2e^{\frac{1}{k}}+\cdots+ke^{\frac{k-1}{k}}$
and
$$
e^{-\frac{1}{k}}S_k-S_k=1+e^{\frac{1}{k}}+e^{\frac{2}{k}}+\cdots+e^{\frac{k-1}{k}}-ke=\frac{1-e}{1-e^{\frac{1}{k}}}-ke.
$$
Dividing both sides by $e^{-\frac{1}{k}}-1$ yields that
$$
S_k =\frac{e^{\frac{1}{k}}}{1-e^{\frac{1}{k}}}\biggl(\frac{1-e}{1-e^{\frac{1}{k}}}-ke\biggr).
$$
A: $S=e^{\frac{1}{k}}+2 e^{\frac{2}{k}}+3 e^{\frac{3}{k}}+\cdots+k e^{\frac{k}{k}}=e^{\frac{1}{k}}\left(1+2 e^{\frac{1}{k}}+3 e^{\frac{2}{k}}+\cdots+k e^{\frac{k-1}{k}}\right)$
Use your formula, set $a=1, d=1, r=e^{\frac{1}{k}}, n=k$
$S=e^{\frac{1}{k}}\left(\frac{a-[a+(n-1) d] r^n}{1-r}+\frac{d r\left(1-r^{n-1}\right)}{(1-r)^2}\right)=e^{\frac{1}{k}}\left(\frac{1-ke}{1-e^{\frac{1}{k}}}+\frac{e^{\frac{1}{k}}-e}{(1-e^{\frac{1}{k}})^2}\right)$
$=e^{\frac{1}{k}}\left(\frac{ke}{e^{\frac{1}{k}}-1}+\frac{-1}{e^{\frac{1}{k}}-1}+\frac{e^{\frac{1}{k}}-e}{(e^{\frac{1}{k}}-1)^2}\right)=e^{\frac{1}{k}}\left(\frac{ke}{e^{\frac{1}{k}}-1}+\frac{1-e^\frac{1}{k}}{(e^{\frac{1}{k}}-1)^2}+\frac{e^{\frac{1}{k}}-e}{(e^{\frac{1}{k}}-1)^2}\right)$
$=e^{\frac{1}{k}}\left(\frac{ke}{e^{\frac{1}{k}}-1}+\frac{(1-e)}{(e^{\frac{1}{k}}-1)^2}\right)$
