2

Question

While Solving a recursive equation , i am stuck at this summation and unable to move forward.Summation is

$$\sum_{j=0}^{n-2}2^j (n-j)$$

My Approach

$$\sum_{j=0}^{n-2}2^j (n-j) = \sum_{j=0}^{n-2}2^j \times n-\sum_{j=0}^{n-2} 2^{j} \times j$$

$$=n \times (2^{n-1}-1)-\sum_{j=0}^{n-2} 2^{j} \times j$$

I am unable to move forward , please help me out!

laura
  • 2,530

3 Answers3

4

Hint

Consider $$\sum_{i=0}^p i x^i=x\sum_{i=0}^p i x^{i-1}=x\left(\sum_{i=0}^p x^i \right)'$$

  • Okk sir , now i can first solve $\sum_{i=0}^p x^{i}$ i.e $\frac{x^{p+1}-1 }{x-1}$ and then find its derivative. But sir i am not getting why you have done $x\left(\sum_{i=0}^p x^i \right)'$ why not $x\left(\sum_{i=0}^p x^{i-1} \right)'$ – laura Oct 31 '17 at 07:29
  • @laura. If you write your last expression, what would be the first term (corresponding to $i=0$ ? Morover the derivative would be wrong. – Claude Leibovici Oct 31 '17 at 07:36
1

In general: \begin{align} \sum_{k=0}^{n} x^{k} &= \frac{1 - x^{n+1}}{1-x} \\ \sum_{k=0}^{n} k \, x^{k} &= \frac{x \, (1 - (n+1) x^{n} + n x^{n+1})}{(1-x)^{2}} \end{align} Now \begin{align} \sum_{k=0}^{n} k \, \frac{1}{x^{k}} &= \frac{n - (n+1) x + x^{n+1}}{x^{n} \, (1-x)^{2}} \\ \sum_{k=0}^{n} k \, x^{n-k} &= \frac{n - (n+1) x + x^{n+1}}{ (x-1)^{2}}. \end{align}

Using $$\sum_{k=0}^{n} k \, x^{n-k} = \sum_{k=0}^{n} (n-k) \, x^{k} = \sum_{k=0}^{n-2} (n-k) \, x^{k} + x^{n-1}$$ then \begin{align} \sum_{k=0}^{n-2} (n-k) \, x^{k} &= \sum_{k=0}^{n} k \, x^{n-k} - x^{n-1} = \frac{(2x-1) x^{n-1} - (n+1) x + n}{(x-1)^{2}} \end{align}

for the case of $x=2$ this becomes $$ \sum_{k=0}^{n-2} (n-k) \, 2^{k} = 3 \cdot 2^{n-1} - n - 2.$$

Leucippus
  • 26,329
0

$$\sum_{j=1}^{n-2}j\;2^j=2+2\times 2^2+3\times 2^3+\cdots+(n-2)2^{n-2}$$$$=[2+2^2+2^3+\cdots+2^{n-2}]+[2^2+2^3+\cdots+2^{n-2}]+[2^3+\cdots+2^{n-2}]+\cdots+2^{n-2}$$$$=2(2^{n-2}-1)+2^2(2^{n-3}-1)+2^3(2^{n-4}-1)+\cdots+2^{n-2}(2^{n-(n-1)}-1)$$ $$=(2^{n-1}-2)+(2^{n-1}-2^2)+(2^{n-1}-2^3)+\cdots+(2^{n-1}-2^{n-2})$$ $$=(n-2)2^{n-1}-(2+2^2+\cdots+2^{n-2})=(n-2)2^{n-1}-2(2^{n-2}-1)$$ $$=(n-2)2^{n-1}-2^{n-1}+2=(n-3)2^{n-1}+2$$