How to solve the following expression I have the following expression: $2^{n-3}+\sum_{k=1}^{n-3} 2^{k-1}(n-k+1)^2$ and I have no idea how to solve it. I tried plugging it in WolframAlpha to get an idea but it gives me $-n^2 - 4 n + 7 \cdot 2^{n - 1} - 6$ and I have even less of an idea how I would get there.
I don't need the complete solution done. I just would like pointers on how to solve it.

Expand:
$$E=2^{n-3}+\sum_{k=1}^{n-3} 2^{k-1}(n-(k-1))^2=\\
2^{n-3}+\color{red}{n^2\sum_{k=1}^{n-3} 2^{k-1}}-2n\color{green}{\sum_{k=1}^{n-3}(k-1)2^{k-1}}+\color{blue}{\sum_{k=1}^{n-3}(k-1)^22^{k-1}}$$
One:
$$\color{red}{n^2\sum_{k=1}^{n-3} 2^{k-1}}=n^2\cdot \frac{2^{n-3}-1}{2-1}=\color{red}{n^2\cdot 2^{n-3}-n^2}$$
Two:
$$f(x)=\sum_{k=1}^{n-3} x^{k-1}=\frac{x^{n-3}-1}{x-1}\\
f'(x)=\sum_{k=1}^{n-3} (k-1)x^{k-2}=\frac{(n-3)x^{n-4}(x-1)-x^{n-3}+1}{(x-1)^2}\\
xf'(x)=\sum_{k=1}^{n-3} (k-1)x^{k-1}=\frac{(n-4)x^{n-2}-(n-3)x^{n-3}+x}{(x-1)^2}\\
2f'(2)=\color{green}{\sum_{k=1}^{n-3} (k-1)2^{k-1}}=(n-4)2^{n-2}-(n-3)2^{n-3}+2=\\
\color{green}{n\cdot 2^{n-3}-5\cdot 2^{n-3}+2}$$
Three:
$$f(x)=\sum_{k=1}^{n-3} (k-1)x^{k-1}=\frac{(n-4)x^{n-2}-(n-3)x^{n-3}+x}{(x-1)^2}\\
f'(x)=\sum_{k=1}^{n-3} (k-1)^2x^{k-2}=\cdots\\
xf'(x)=\sum_{k=1}^{n-3} (k-1)^2x^{k-1}=\cdots\\
2f'(2)=\color{blue}{\sum_{k=1}^{n-3} (k-1)^22^{k-1}}=\cdots=\\
\color{blue}{n^2\cdot 2^{n-3}-5n\cdot 2^{n-2}+27\cdot 2^{n-3}-6}$$
If all plugged in, it results in the stated answer. 
Wolfram answer.
