Odd Square is Eight Triangles Plus One

Theorem
Let $n \in \Z$ be an odd integer.

Then $n$ is square $n = 8 m + 1$ where $m$ is triangular.

Proof
Follows directly from the identity:

as follows:

Let $m$ be triangular.

Then from Closed Form for Triangular Numbers:
 * $\exists k \in \Z: m = \dfrac {k \paren {k + 1} } 2$

From the above identity:
 * $8 m + 1 = \paren {2 k + 1}^2$

which is an odd square.

Let $n$ be an odd square.

Then $n = r^2$ where $r$ is odd.

Let $r = 2 k + 1$, so that $n = \paren {2 k + 1}^2$.

From the above identity:
 * $n = 8 \dfrac {k \paren {k + 1} } 2 + 1 = 8 m + 1$

where $m$ is triangular.

Illustration

 * 8TrianglesPlus1.png

Also see

 * Odd Square Modulo 8