# Integer is Sum of Three Triangular Numbers

## Theorem

Let $n$ be a positive integer.

Then $n$ is the sum of $3$ triangular numbers.

## Proof

From Integer as Sum of Three Odd Squares, $8 n + 3$ is the sum of $3$ odd squares.

So:

 $\, \displaystyle \forall n \in \Z_{\ge 0}: \,$ $\displaystyle 8 n + 3$ $=$ $\displaystyle \paren {2 x + 1}^2 + \paren {2 y + 1}^2 + \paren {2 z + 1}^2$ for some $x, y, z \in \Z_{\ge 0}$ $\displaystyle$ $=$ $\displaystyle 4 x^2 + 4 x + 4 y^2 + 4 y + 4 z^2 + 4 z + 3$ $\displaystyle$ $=$ $\displaystyle 4 \paren {x \paren {x + 1} + y \paren {y + 1} + z \paren {z + 1} } + 3$ $\displaystyle \leadsto \ \$ $\displaystyle n$ $=$ $\displaystyle \frac {x \paren {x + 1} } 2 + \frac {y \paren {y + 1} } 2 + \frac {z \paren {z + 1} } 2$ subtracting $3$ and dividing both sides by $8$

By Closed Form for Triangular Numbers, each of $\dfrac {x \paren {x + 1} } 2$, $\dfrac {y \paren {y + 1} } 2$ and $\dfrac {z \paren {z + 1} } 2$ are triangular numbers.

$\blacksquare$

## Also known as

This theorem is often referred to as Gauss's Eureka Theorem, from Carl Friedrich Gauss's famous diary entry.

## Historical Note

Carl Friedrich Gauss proved that every Integer is Sum of Three Triangular Numbers.

The $18$th entry in his diary, dated $10$th July $1796$, made when he was $19$ years old, reads:

$**\Epsilon\Upsilon\Rho\Eta\Kappa\Alpha \quad \text{num} = \Delta + \Delta + \Delta.$