1+2+...+n+(n-1)+...+1 = n^2

From ProofWiki
Jump to navigation Jump to search

Theorem

$\forall n \in \N: 1 + 2 + \cdots + n + \left({n-1}\right) + \cdots + 1 = n^2$


Direct Proof 1

\(\displaystyle \) \(\) \(\displaystyle 1 + 2 + \cdots + \paren {n - 1} + n + \paren {n - 1} + \cdots + 1\)
\(\displaystyle \) \(=\) \(\displaystyle 1 + 2 + \cdots + \paren {n - 1} + \paren {n - 1} + \cdots + 1 + n\)
\(\displaystyle \) \(=\) \(\displaystyle 2 \paren {1 + 2 + \cdots + \paren {n - 1} } + n\)
\(\displaystyle \) \(=\) \(\displaystyle 2 \paren {\frac {\paren {n - 1} n} 2} + n\) Closed Form for Triangular Numbers
\(\displaystyle \) \(=\) \(\displaystyle \paren {n - 1} n + n\)
\(\displaystyle \) \(=\) \(\displaystyle n^2 - n + n\)
\(\displaystyle \) \(=\) \(\displaystyle n^2\)

$\blacksquare$


Direct Proof 2

\(\displaystyle \) \(\) \(\displaystyle 1 + 2 + \cdots + \paren {n - 1} + n + \paren {n - 1} + \cdots + 1\)
\(\displaystyle \) \(=\) \(\displaystyle \paren {1 + 2 + \cdots + \paren {n - 1} } + \paren {1 + 2 + \cdots + \paren {n - 1} + n}\)
\(\displaystyle \) \(=\) \(\displaystyle \frac {\paren {n - 1} n} 2 + \frac {n \paren {n + 1} } 2\) Closed Form for Triangular Numbers
\(\displaystyle \) \(=\) \(\displaystyle \frac {n^2 - n + n^2 + n} 2\)
\(\displaystyle \) \(=\) \(\displaystyle n^2\)

$\blacksquare$


Proof by Induction

Proof by induction:

Basis for the Induction

$n = 1$ holds trivially.

Just to make sure, we try $n = 2$:

$1 + 2 + 1 = 4$

Likewise $n^2 = 2^2 = 4$.

So shown for basis for the induction.


Induction Hypothesis

This is our induction hypothesis:

$1 + 2 + \cdots + k + \left({k - 1}\right) + \cdots + 1 = k^2$

Now we need to show true for $n=k+1$:

$1 + 2 + \cdots + \left({k + 1}\right) + k + \left({k - 1}\right) + \cdots + 1 = \left({k + 1}\right)^2$


Induction Step

This is our induction step:

\(\displaystyle \) \(\) \(\displaystyle 1 + 2 + \cdots + \left({k + 1}\right) + k + \left({k - 1}\right) + \cdots + 1\)
\(\displaystyle \) \(=\) \(\displaystyle \left({1 + 2 + \cdots + k + \left({k - 1}\right) + \cdots + 1}\right) + k + \left({k + 1}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle k^2 + k + \left({k + 1}\right)\) from induction hypothesis
\(\displaystyle \) \(=\) \(\displaystyle k^2 + 2k + 1\)
\(\displaystyle \) \(=\) \(\displaystyle \left({k + 1}\right)^2\)

The result follows by induction.

$\blacksquare$


Proof 4

Let $T_n = 1 + 2 + \cdots + n + \left({n - 1}\right) + \cdots + 1$.

We have $T_1 = 1$

and

\(\displaystyle T_n - T_{n-1}\) \(=\) \(\displaystyle \left({1 + 2 + \cdots + n + \left({n - 1}\right) + \cdots + 1 }\right)\) Definition of $T_n$
\(\displaystyle \) \(\) \(\, \displaystyle - \, \) \(\displaystyle \left({1 + 2 + \cdots + \left({n - 1}\right) + \left({n - 2}\right) + \cdots + 1}\right)\)
\(\displaystyle \) \(=\) \(\displaystyle \left({\left({1 + 2 + \cdots + n}\right) - \left({1 + 2 + \cdots + \left({n - 1}\right)}\right)}\right)\) Integer Addition is Associative
\(\displaystyle \) \(\) \(\, \displaystyle + \, \) \(\displaystyle \left({\left({\left({n - 1}\right) + \left({n - 2}\right) + \cdots + 1}\right) - \left({\left({n - 2}\right) + \left({n - 3}\right) + \cdots + 1}\right)}\right)\) Integer Addition is Commutative
\(\displaystyle \) \(=\) \(\displaystyle n + \left({n - 1}\right)\) simplifying
\(\displaystyle \) \(=\) \(\displaystyle 2 n - 1\)

Thus we have:

\(\displaystyle T_n\) \(=\) \(\displaystyle \left({T_n - T_{n-1} }\right) + \left({T_{n-1} - T_{n-2} }\right) + \cdots + \left({T_2 - T_1}\right) + T_1\)
\(\displaystyle \) \(=\) \(\displaystyle \left({2 n - 1}\right) + \left({2 \left({n - 1}\right) - 1}\right) + \cdots + \left({2 \times 2 - 1}\right) + 1\)
\(\displaystyle \) \(=\) \(\displaystyle \sum_{k \mathop = 1}^n 2 k - 1\)
\(\displaystyle \) \(=\) \(\displaystyle n^2\) Odd Number Theorem


$\blacksquare$


Illustration

1plus2plusnplus2plus1.png


Sources