3

I have a question about a formula describing a sum of partial sums. So, a partial sum is, famously:

$$k = \frac{n(n+1)}{2}$$

Now, I wanted to know how to write down the sum of this (up to the $n^{th}$ term):

$$\frac{n(n+1)}{2} + \frac{(n- 1)(n - 1+1)}{2} + \frac{(n- 2)(n - 2+1)}{2} \dots+ 1$$

The best thing i can come up with would be to include the summation notation:

$$\sum_{0}^{n}\frac{(n-i)(n-i+1)}{2}$$

Is there a way to simplify it further?

Naively, I though of substituting $$x = \frac{n(n+1)}{2}$$ and then doing $$\frac{(x)(x+1)}{2}$$ but it obviously doesn't work (I wrote a few lines of code to check it).

There's no particular point to it, I just wanted to familiarize myself with the notation.

Zlo
  • 143
  • 3
  • 1
    The sum you are finding are simply the $n$th triangle numbers. See https://en.wikipedia.org/wiki/Triangular_number. – Yuki.F Apr 26 '21 at 16:17
  • 1
    If you can find a formula for $\sum_{k=1}^n k^2$ then you can expand everything out and use that identity. – Jair Taylor Apr 26 '21 at 16:21

5 Answers5

4

There's a few ways to write this, depending on what you're looking for.

As you said, we have a formula for the partial sums

$$S_n = \sum_{k = 0}^n k = \frac{(n+1)n}{2}.$$

Then if you want the sums of these, say the first $N$ many, then you want

$$\sum_{n = 0}^N S_n = \sum_{n = 0}^N \sum_{k = 0}^n k.$$

As you've said, another way to write this is as

$$\sum_{n = 0}^N \frac{(n+1)n}{2}$$

Of course, we can simplify this to

$$\frac{1}{2} \left ( \sum_{n = 0}^N n^2 + \sum_{n=0}^N n \right )$$

(do you see why?), and these sums both have well known formulas, letting us finish off with

$$\sum_{n=0}^N \sum_{k=0}^n k = \frac{N^3}{6} + \frac{N^2}{2} + \frac{N}{3}.$$


As an aside, you might notice we summed $k$ twice and got something that looked cubic. If you know some calculus, you'll know that integrating $x$ twice will give $\frac{x^3}{6}$ plus some constant... which looks suspiciously similar to the $\frac{N^3}{6}$ that we got from the above sum.

It turns out this can be made precise with "finite calculus", as explained in Knuth, Grahm, and Patashnik's (excellent) Concrete Mathematics as well as in the (very well written) pdf here by David Gleich. This is a very useful technique for evaluating tricky sums like this, and if it sounds interesting, I recommend looking into it!


I hope this helps ^_^

  • 1
    Thanks! Definitely helps. Still difficult to understand how $\sum_{n=0}^{N}\sum_{k=0}^{n}k = \frac{N^3}{6} + \frac{N^2}{2} + \frac{N}{3}$, so I'll have to check out Concrete Mathematics. Thanks for the recommendation! – Zlo Apr 26 '21 at 18:39
3

Your first expression can be written as $$\sum\limits_{k=1}^n k = \tfrac12 n(n+1)$$

What you are looking for seems to be $$\sum\limits_{n=1}^m\sum\limits_{k=1}^n k = \sum\limits_{n=1}^m \tfrac12 n(n+1)$$

This can be expanded into $\tfrac12 \sum\limits_{n=1}^m n^2 + \tfrac12\sum\limits_{n=1}^m n$, and you can do the second sum using the first result. Another sum is $\sum\limits_{k=1}^n k^2 =\frac16 n(n+1)(2n+1)$ so expanding and tidying up you get $$\sum\limits_{n=1}^m \tfrac12 n(n+1) = \frac16m^3+\frac12m^2+\frac13m \\= \frac16m(m+1)(m+2)$$

These sorts of sums typically produce polynomial results where the degree of the result is the degree of the polynomial being summed plus the number of sums taken

Henry
  • 169,616
1

If you don't wanna use the summation notation, you can write two or three sentences of the sum and the last one, from left to write:

$$ \frac{1\times 2}{2} + \frac{2\times 3}{2} + \frac{3\times 4}{2} + \cdots + \frac{n\times (n+1)}{2} $$

Also, the summation notation is well and compact, but you need to write more accurately (with the specific variable of the summation):

$$ \sum_{i=1}^{n} \frac{i (i+1)}{2} $$

Or equivalently:

$$ \frac{1}{2}\sum_{i=1}^{n} i (i+1) $$

OmG
  • 3,142
1

It probably helps to reverse the order of these $n$ terms, but since $\sum_{i=1}^nu_i=\sum_{i=1}^nu_{n+1-i}$ you can use either $\sum_{i=1}^n\tfrac{i(i+1)}{2}$ or $\sum_{i=1}^n\tfrac{(n-i+1)(n-i+2)}{2}$ (as angryavian noted). With an index shift the latter becomes $\sum_{i=0}^{n-1}\tfrac{(n-i)(n-i+1)}{2}$, so you were close.

J.G.
  • 118,053
1

$$\text{Let set}\quad \begin{cases}U_p(n)=\prod\limits_{k=1}^{p} (n+k)\\T_p(n)=\frac 1{p+1}(U_p(n)-U_p(n-1))\end{cases}$$

Notice that $T$ and $U$ share an induction relation:

$\begin{align}T_p(n) &=\frac 1{p+1}\Big(n(n+1)\cdots(n+p)\quad-\quad(n-1)(n)\cdots(n+p-1)\Big)\\ &=\frac 1{p+1}\Big(n(n+1)\cdots(n+p-1)\underbrace{(n+p-(n-1))}_{p+1}\Big)\\ &=U_{p-1}(n)\end{align}$


It follows that $\ \displaystyle\sum\limits_{k=1}^n U_p(k)=\sum\limits_{k=1}^n T_{p+1}(k)=\frac 1{p+2}\Big(U_{p+1}(n)-\underbrace{U_{p+1}(0)}_0\Big)$

since $T$ is telescopic and therefore

$$\sum\limits_{k=1}^n U_p(k)=\frac{1}{p+2}\,U_{p+1}(n)$$

  • $U_{-1}(n)=1$ then $\sum\limits_{k=1}^n 1=U_0(n)=n$
  • $U_{0}(n)=n$ then $\sum\limits_{k=1}^n k=\frac 12U_1(n)=\frac 12n(n+1)$
  • $U_{1}(n)=n(n+1)$ then $\sum\limits_{k=1}^n k(k+1)=\frac 13U_2(n)=\frac 13n(n+1)(n+2)$
  • etc...
zwim
  • 29,833