Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having some difficulty finding a closed-form for this

$\displaystyle\sum_{x=1}^{L}(L+1-xa)(L+1-xb)(2^{x-1}-1)$ (assume $L$, $a$, and $b$ are known)

Or does it not exist?

share|cite|improve this question
up vote 2 down vote accepted

By multiplying out, we can reduce the problem to sums of the form (i) $\sum 2^{x-1}$ (geometric series, familiar formula), (ii) $\sum x2^{x-1}$, and (iii) $\sum x^22^{x-1}$. (There will also be terms of the type $\sum x$ and $\sum x^2$, that are settled by standard formulas.)

The types (ii) and (iii) have often come up om MSE. There are many approaches. For example, consider $F(n)=\sum_1^n x 2^{x-1}$. Thus $$F(n)=1\cdot 2^0 +2\cdot 2^1+3\cdot 2^2+\cdots +n\cdot n2^{n-1}.$$ Multiply the above expression for $F(n)$ by $2$. We get $$2F(n)=1\cdot 2^1+2\cdot 2^2 +3\cdot 2^3+\cdots +n\cdot 2^n.$$ Subtract. We get $$2F(n)-F(n)=F(n)= -(2^0+2^1+2^2+\cdots +2^{n-1})+n2^n.$$ The part in parentheses above is a finite geometric series, with easily computed sum.

For $\sum_1^n x^2 2^{x-1}$, use fundamentally the same trick, except that when we subtract we find that we need $\sum x2^{x-1}$. Conveniently, that sort of sum has just been calculated.

share|cite|improve this answer
Do I absolutely have to multiply everything out? I had done so on Wolfram and it looked quite long and unreadable. You are saying I have to multiply it all out and then sum each piece separately? – NullOverNull Feb 22 '13 at 20:17
See – NullOverNull Feb 22 '13 at 20:25
There may be shortcuts. I do not see anything that helps dramatically. – André Nicolas Feb 22 '13 at 20:43
I did a quick calculation, got the same answer as you did, in slightly different form. There is good reason to think we did not both err. – André Nicolas Feb 22 '13 at 21:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.