<s>[INST] Sum binomial coefficients $$\sum_{k=0}^{n} {\frac{k^2+k}{3^{k+2}} {n \choose k}}=?$$
What I've tried:
$$(k^2+k){n \choose k}=k(k+1){\frac{n!}{k!(n-k)!}}$$
$$k^2+k = k^2-k+2k=k(k-1)+2k$$ =>
$$
\begin{align}
(k^2+k){n \choose k} &= k(k-1){\frac{n!}{k!(n-k)!}}+2k{\frac{n!}{k!(n-k)!}}\\&={\frac{n!}{(k-2)!(n-k)!}}+2{\frac{n!}{(k-1)!(n-k)!}}\\&=n(n-1){n-2 \choose k-2}+2n{n-1 \choose k-1}
\end{align}
$$
and
$${\frac{1}{3^{k+2}}}={\frac{1}{9}}({\frac{1}{3}})^k$$
So I have
$$\sum_{k=0}^{n} {\frac{n(n-1){n-2 \choose k-2}+2n{n-1 \choose k-1}}{9*3^k}}$$
And I'm stuck... Can anyone help me?
 [/INST] Starting where you stopped:
$$\begin{align}\sum_{k=0}^n(k^2+k)\binom nkx^k&=n(n-1)x^2\sum_{k=2}^n\binom{n-2}{k-2}x^{k-2}+2nx\sum_{k=1}^n\binom{n-1}{k-1}x^{k-1}\\
&=n(n-1)x^2(1+x)^{n-2}+2nx(1+x)^{n-1}\\
&=nx(1+x)^{n-2}((n-1)x+2(1+x))\\
&=nx(1+x)^{n-2}((n+1)x+2)\end{align}$$
hence
$$\begin{align}\sum_{k=0}^n\frac{k^2+k}{3^{k+2}}\binom nk
&=\frac{\frac n3(4/3)^{n-2}((n+1)/3+2)}9\\
&=\frac{4^{n-2}n(n+7)}{3^{n+1}}.\end{align}$$
However, as hinted by Ragib Zaman, there is a standard more direct way to obtain the generic formula above. Here it goes:
$$\begin{align}\sum_{k=0}^n\binom nkx^k=(1+x)^n&\implies\sum_{k=0}^n\binom nkkx^k=((1+x)^n)'x=nx(1+x)^{n-1}\\
&\implies\sum_{k=0}^n\binom nkk^2x^k=(nx(1+x)^{n-1})'x=nx(1+x)^{n-2}(nx+1),
\end{align}$$
and we recover the same result as above:
$$\begin{align}\sum_{k=0}^n\binom nk(k^2+k)x^k&=nx(1+x)^{n-2}(1+x+nx+1)\\&=nx(1+x)^{n-2}((n+1)x+2).\end{align}$$
</s>