# Einstein's summation of integers from 1 to n

Is anyone familiar with Einstein's way of summing integers from 1 to n? I am reading the "Heard on The Street" book, which contains Q&A of the interviews for a quant role. And in answers they give the general Gauss methodology of summing integers and then proceed to explain Einstein's way. But the explanation is terrible in my opinion and I cannot wrap my head around it. Would anyone be willing to explain it? (It deals with arrays, they demonstrate the technique on series from 1 to 100)

EDIT: see my answer below for the descriptions of each method.

• Are you sure they weren't talking about Einstein's summation notation?
– user137731
Sep 17, 2015 at 13:45
• Maybe you should include a summary of both the Gauss and the Einstein methodologies, at least for a shorter sum. [I and maybe many others do not have the book you cite.] Sep 17, 2015 at 13:46
• Yes, I am sure.
– Naz
Sep 17, 2015 at 13:46

As you are aware, the Gauss method for summing $$n$$ number of integers is to reverse the series and then add it to itself and divide by two, like so:
If $$S_n = 1 + 2 + 3 + ... + n$$ then we can rewrite that as $$S_n = n+(n-1)+(n-2)+ ... + 1$$ Adding the two together $$2S_n = n(n+1)$$ or $$S_n = \frac{n(n+1)}{2}$$
Now, in order to find the number of objects that that triangle is composed of for a given side $$n$$, we can use a notion of the rectangular numbers. We know that the formula for the number of objects of which the rectangle is composed of is $$n(n+1)$$. Since, the triangle is composed of half of those, the formula must be $$\displaystyle{\frac{n(n+1)}{2}}$$. And this is "Einstein's" method of summing a series of integers.