<?xml version="1.0" encoding="UTF-8"?>

<record version="2" id="1698">
 <title>triangular numbers</title>
 <name>TriangularNumbers</name>
 <created>2002-02-02 23:23:46</created>
 <modified>2002-02-02 23:33:40</modified>
 <type>Definition</type>
 <creator id="2" name="akrowne"/>
 <author id="2" name="akrowne"/>
 <classification>
	<category scheme="msc" code="11A99"/>
	<category scheme="msc" code="40-00"/>
 </classification>
 <preamble>\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

%\usepackage{psfrag}
%\usepackage{graphicx}
%\usepackage{xypic}</preamble>
 <content>The \emph{triangular numbers} are defined by the series

$$ t_n = \sum_{i=1}^n i $$

That is, the $n$th triangular number is simply the sum of the first $n$ natural numbers.  The first few triangular numbers are

$$ 1, 3, 6, 10, 15, 21, 28, \ldots $$

The name triangular number comes from the fact that the summation defining $t_n$ can be visualized as the number of dots in

$$ \begin{matrix}
 \bullet &amp; &amp; &amp; &amp; &amp; &amp; &amp; \\
 \bullet &amp; \bullet &amp; &amp; &amp; &amp; &amp; &amp; \\
 \bullet &amp; \bullet &amp; \bullet &amp; &amp; &amp; &amp; &amp; \\
 \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; &amp; &amp;  &amp; \\
 \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; &amp; &amp; \\
 \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; &amp; \\
 \vdots &amp;  &amp;  &amp;  &amp;  &amp; \vdots &amp; \ddots &amp; 
\end{matrix} $$

where the number of rows is equal to $n$.  

The closed-form for the triangular numbers is 

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

Legend has it that a grammar-school-aged Gauss was told by his teacher to sum up all the numbers from 1 to 100.  He reasoned that each number $i$ could be paired up with $101-i$, to form a sum of $101$, and if this was done $100$ times, it would result in twice the actual sum (since each number would get used twice due to the pairing).  Hence, the sum would be 

$$ 1+2+3+\cdots+100 = \frac{100(101)}{2} $$

The same line of reasoning works to give us the closed form for any $n$.

Another way to derive the closed form is to assume that the $n$th triangular number is less than or equal to the $n$th square (that is, each row is less than or equal to $n$, so the sum of all rows must be less than or equal to $n\cdot n$ or $n^2$), and then use the first few triangular numbers to solve the general 2nd degree polynomial $An^2 + Bn + C$ for $A$, $B$, and $C$.  This leads to $A=1/2$, $B=1/2$, and $C=0$, which is the same as the above formula for $t(n)$.</content>
</record>
