# Is this already an equation/law that has been found?

So I was messing around with some numbers today and I have found a way to quickly add summations (probably not the first one to discover it but...) this only works when you start at 1 (i.e. $1+2+3+4+5$) The equations are these

If the number ($n$) is odd do this:

$$\sum=\left(\frac{n+1}{2}\right)\cdot{}n$$

If the number ($n$) is even do this:

$$\sum =\left ( \frac{(n/2)+(n/2+1) }{2} \right )\ast n$$

So my question is, is this already a law/equation of some sort that someone has already found out because I think I remember hearing something similar to it but I do not know. Unfortunately I am only a freshman in geometry so have never been exposed to any things having to do with summations :(

-
It is great that you found these yourself - that is always the best way to discover Mathematics even if other people have found the same thing before you. Of course this has been discovered before and there are all kinds of extensions of it to explore (try adding only odd numbers and see what happens, or square numbers, or cubes - cubes are a surprise). But just about everyone with an ounce of mathematics in their brain who encountered this for the first time thought it was neat or better. Keep going, keep noticing, keep finding things out. – Mark Bennet Apr 15 '14 at 20:26
Because you discovered the formula youself, let's give you a bonus: $$1^2 + 2^2 + \cdots + n^2 = \sum_{i = 1}^n i^2 = \dfrac{n(n+1)(2n+1)}{6}$$ and $$1^3 + 2^3 + \cdots + n^3 = \sum_{i = 1}^n i^3 = \dfrac{n^2(n+1)^2}{4}=(\sum_{i = 1}^n i)^2$$ – Nicky Hekster Apr 15 '14 at 20:56
Ok so I just tried it with odd numbers and it seems to be you take the center number and square it? Is that it? – Ben T Apr 15 '14 at 20:57
Like the center number in the sequence like: 1+3+5+7+9+11=36 because the middle number (5+7/2=6) 6 suqared is 36 – Ben T Apr 15 '14 at 20:59
Yes, that's right, the sum of the first $n$ odd numbers is $n^2$. – Daniel Fischer Apr 15 '14 at 21:06

Both formulas amount ot $\frac{n(n+1)}{2}$ (where the numerator is even because one of $n, n+1$ is even). This is a well-known result and anecdotally attributed to Gauß who - as a child - is said to have solved the summation $1+2+\ldots +100$ within seconds, much to the surprise of his teacher who hd posed the problem in order to keep his class busy for a longer while ...

-
It occurs to me that Gauss' teacher might have been the first person whose attempt at creating a software delay loop was foiled by optimization! – Kaz Apr 15 '14 at 22:10
Incorrectly anecdotally attributed to Gauss ;-) Supposing that the anecdote is true he independently discovered it but doesn't have priority. Blaise Pascal proved a general formula for binomial coefficients now expressed $\frac{n!}{k!(n-k)!}$, that reduces to this formula for the third row or column of Pascal's Triangle (well, with an off-by-one error on the index $n$). I don't know who first had this result on its own, although I wouldn't be surprised if it's lost to history. – Steve Jessop Apr 16 '14 at 0:00
I've only seen that attribution in "Die Vermessung der Welt". – c.p. Apr 16 '14 at 2:14

The formula for the sum of all natural numbers less than or equal to $n$ is well known: and it holds for both odd and even $n$ $$1 + 2 + \cdots + n = \sum_{i = 1}^n i = \dfrac{n(n+1)}{2}$$

-
Wow that is a lot more condensed than my equation haha thank you I have never heard of this before. I am only a freshman in Geometry so this is all new stuff to me! – Ben T Apr 15 '14 at 20:26
Good for you! Having discovered this yourself, you'll no doubt remember it forever! It's the best way to learn! – amWhy Apr 15 '14 at 20:28

Both results are the same, and are an instance of the formula for the sum of an arithmetic progression, in which each term is obtained from the previous one by adding a constant increment. In general the sum of such a progression is the product of its number of terms times the average of its first and last terms. Maybe you can see right away why this is so (it is a nice exercise); if not the linked article explains it. There also exists a formula for the sum of a geometric progression, in which each term is obtained from the previous one by a multiplying by a constant factor, and indeed for many more types of finite sums.

-