$1 + \frac 64 + \frac {14}8 + \frac {30}{16} + \ldots$ I have to calculate the sum upto n terms of the following:
$$1 + \frac 64 + \frac {14}8 + \frac {30}{16} + \ldots$$
I found the general term as:
$$T_n = \frac {an^2+bn+c}{2^{n}},$$ where a, b and c are determined as follows:
$$a+b+c=2; 4a+2b+c=6; 9a+3b+c=14.$$
Solving and applying:
$$T_n = \frac {2n^2-2n+2}{2^{n}} = \frac {n^2-n+1}{2^{n-1}}.$$
Now, how to compute:
$$\sum_{k=1}^{n} \frac {k^2-k+1}{2^{k-1}}$$

The general term of the sum is wrong check for $k=4$ for example, actually the sum of the $N$ first terms is :
$$1 + \frac 64 + \frac {14}8 + \frac {30}{16} + \ldots=\sum_{k=1}^{N} \frac {2^{k+1}-2}{2^k}=\sum_{k=1}^{N} \frac {2(2^{k}-1)}{2^k}\\=\sum_{k=1}^{N} \frac {2^{k}-1}{2^{k-1}}=\sum_{k=1}^{N} 2-\sum_{k=1}^{N} \frac {1}{2^{k-1}}=2N+\left(\frac 1 2\right)^{N-1}-2$$
