Triangular number square-complement identity (source code)

= Triangular number square-complement identity
{title2=$T_n+T_{n-1}=n^2$}

For $n\geq1$,
$$
T_n+T_{n-1}=n^2.
$$
An $n$-by-$n$ array of cells has $n^2$ cells. One side of the diagonal, including the diagonal itself, contains $1+2+\cdots+n=T_n$ cells; the other contains $1+2+\cdots+(n-1)=T_{n-1}$. For $n=5$, the two counts are fifteen and ten, giving twenty-five. The identity is stated in <Introduction to Arithmetic by Nicomachus (Hahn teacher edition)> (Book II, Chapter 12, §§1–2, printed p. 70).