# Why does this formula have the summation sign?

I'm doing a programming tutorial and an algorithm to sum each number up to N can also be done by the below formula. E.g. if n = 10, 1+2..+10 = 55.

Forgive me for the stupid question :) but why does the formula use the sigma notation? Could we not use this formula without the summation and get the same result?

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

• Welcome to MSE. Will you please rephrase your question? I simply have no idea about what you are asking. Jan 5, 2021 at 9:23

Note that $$1+2+\dots + n = \sum_{i=1}^n i = \frac{n(n+1)}{2}$$ So, both notations are identical.