1

Which formula can be used to calculate the sum:

$$\sum\limits_{i=1}^{12} \left(1 + \frac{i^2 -i}{2}\right)~~?$$

Is there any formula that can be applied instead of manually adding the 12 numbers?

dEmigOd
  • 3,308
acigard
  • 13
  • 2
    You only need the formulas $$\sum_{i=1}^n i=\frac{n(n+1)}{2}$$ and $$\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}$$ – Peter Aug 28 '18 at 09:26
  • 3
    Since there are only 12 numbers, and they're all less than 100, manually adding them up isn't really that hard, and probably faster and less error prone than trying to apply the general formulas. – Arthur Aug 28 '18 at 09:26
  • @Arthur: you are right, faster and safer. There are two counterarguments, though: this is brute force and you don't learn anything, and the result does not generalize. –  Aug 28 '18 at 09:35
  • @acigard Please recall that if the OP is solved you can evaluate to accept an answer among the given, more details here https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – user Sep 17 '18 at 20:19

1 Answers1

2

Notice that with $S(n):=(n+1)n(n-1)$ we have

$$S(n)-S(n-1)=(n+1)n(n-1)-n(n-1)(n-2)=3n(n-1).$$

So by telescoping, the sum of $i^2-i$ from $1$ to $12$ is

$$\frac{S(12)-S(0)}3.$$

Hence

$$\frac{13\cdot12\cdot11}{3\cdot2}+12.$$


Note that this "trick" generalizes to more factors:

$$(n+1)n(n-1)\cdots(n-k+1)-n(n-1)(n-2)\cdots(n-k) \\=(k+1)n(n-1)\cdots(n-k+1).$$