Respuesta :

[tex]\begin{cases}a_0=1\\a_n=2a_{n-1}+n&\text{for }n>0\end{cases}[/tex]

By the definition above,

[tex]a_{n-1}=2a_{n-2}+(n-1)[/tex]

and by substitution we get

[tex]a_n=2(2a_{n-2}+(n-1))+n=2^2a_{n-2}+2(n-1)+n[/tex]

If we keep following this procedure, we'll start to see a pattern:

[tex]a_{n-2}=2a_{n-3}+(n-2)[/tex]

[tex]\implies a_n=2^2(2a_{n-3}+(n-2))+2(n-1)+n[/tex]

[tex]\implies a_n=2^3a_{n-3}+2^2(n-2)+2(n-1)+n[/tex]

[tex]a_{n-3}=2a_{n-4}+(n-3)[/tex]

[tex]\implies a_n=2^3(2a_{n-4}+(n-3))+2^2(n-2)+2(n-1)+n[/tex]

[tex]\implies a_n=2^4a_{n-4}+2^3(n-3)+2^2(n-2)+2(n-1)+n[/tex]

and so on, down to

[tex]a_n=2^na_0+\displaystyle\sum_{i=0}^{n-1}2^i(n-i)[/tex]

Now,

[tex]\displaystyle\sum_{i=0}^{n-1}2^i(n-i)=n\sum_{i=0}^{n-1}2^i-\sum_{i=0}^{n-1}i2^i[/tex]

One of these series is geometric and has a well-known closed form:

[tex]\displaystyle\sum_{i=0}^{n-1}2^i=2^n-1[/tex]

The other (see note below) is a bit less obvious, but can be derived:

[tex]\displaystyle\sum_{i=0}^{n-1}i2^i=2^n(n-2)+2[/tex]

so we have

[tex]a_n=2^n+n(2^n-1)-(2^n(n-2)+2)[/tex]

[tex]\implies\boxed{a_n=2^{n+1}+2^n-(n+2)}[/tex]

# # #

A brief note on how to compute the sum,

[tex]\displaystyle\sum_{i=0}^{n-1}i2^i=2^n(n-2)+2[/tex]

The first term of the sum is 0:

[tex]\displaystyle\sum_{i=0}^{n-1}i2^i=\sum_{i=1}^{n-1}i2^i[/tex]

Add and substract 1 to the first factor in the summand and expand the sum into two sums:

[tex]\displaystyle\sum_{i=1}^{n-1}i2^i=\sum_{i=1}^{n-1}(i-1+1)2^i=\sum_{i=1}^{n-1}(i-1)2^i+\sum_{i=1}^{n-1}2^i[/tex]

The latter sum we're familiar with. For the other sum, we can shift the index to make it start at [tex]i=0[/tex], and again the first term in the sum would be 0:

[tex]\displaystyle\sum_{i=1}^{n-1}(i-1)2^i=\sum_{i=0}^{n-2}i2^{i+1}=\sum_{i=1}^{n-2}i2^{i+1}[/tex]

So we have

[tex]\displaystyle\sum_{i=0}^{n-1}i2^i=\sum_{i=1}^{n-2}i2^{i+1}+\sum_{i=1}^{n-2}2^i[/tex]

Continuing in this way, we would end up getting

[tex]\displaystyle\sum_{i=0}^{n-1}i2^i=\sum_{i=1}^{n-1}2^i+\sum_{i=2}^{n-1}2^i+\sum_{i=3}^{n-1}2^i+\cdots+\sum_{i=n-2}^{n-1}2^i+\sum_{i=n-1}^{n-1}2^i[/tex]

or as a double sum,

[tex]\displaystyle\sum_{i=0}^{n-1}i2^i=\sum_{k=1}^{n-1}\sum_{i=k}^{n-1}2^i[/tex]

which is easy to reduce:

[tex]\displaystyle\sum_{i=k}^{n-1}2^i=2^n-2^k[/tex]

[tex]\displaystyle\sum_{k=1}^{n-1}(2^n-2^k)=2^n(n-1)-(2^n-2)=2^n(n-2)+2[/tex]

ACCESS MORE