How can I represent the sequence of triangle numbers as a formula Given the sequence: 
$$\begin{gather*}
1^2 \\\
2^2 - 1^2 \\\ 
3^2 - 2^2 + 1^2\\\
4^2 - 3^2 + 2^2 - 1^2\\\
5^2 - 4^2 + 3^2 - 2^2 + 1^2\\\
\vdots
\end{gather*}$$
It's clear that the pattern results in the triangular number sequence $(1,3,6,10,15,\ldots)$ but I'm having trouble putting it into a formula in terms of $n$. Any tips are appreciated! 
 A: $T_n = \frac{n(n+1)}{2}$ and $T_{n-1} = \frac{n(n-1)}{2}$ so $T_n+T_{n-1} = n^2$, i.e. $T_n= n^2- T_{n-1}$.  

So knowing $T_1=1$, you can use induction to show your result.

Another way of looking at the question is to see the triangle number as the sum of L-shaped strips and each L-shape as the difference between consecutive squares.

A: I'm not sure I answered your question; I was only making sure I understood what you are asking. However, I will post a hint: A good way to prove something like
$$\sum_{k=1}^n (-1)^{n-k}k^2=T_n$$
is via induction on $n$. If you can prove the above statement is true when $n=1$, and you can prove that, whenever it is true for $n=a$, it will also be true for $n=a+1$, then it will be true for all $n$.
A: Yet another way to prove it is by first showing that $$n^2=\binom{n+1}{2}+\binom{n}2,$$ and then using a form of telescoping:
$$\binom {n+1}2+\binom n2-\binom n2-\binom{n-1}2+\cdots+(-1)^n\binom 22-(-1)^n\binom 22=\binom{n+1}2.$$
A: For $n=1,2,3,\dots$, let $T_n$ be the $n$-th triangular number, and let $U_n$ be the $n$-th element of our sequence.
We can use the following principle, which we deliberately state a little vaguely. If two sequences begin in the same way, and satisfy the same recurrence, then the 
sequences are the same.  (If the recurrence is second-order, as in the Fibonacci recurrence, "start in the same way" means that the first two terms agree.)
What recurrence shall we use?  Note that $U_1=T_1$, so the two sequences start in the same way.  It is obvious that $U_{n-1}+U_n=n^2$, or equivalently $U_n=n^2-T_{n-1}$.  So if we can show that $T_n=n^2-T_{n-1}$, we will be finished.
In this case, we know an explicit formula for the $n$-th triangular number, since, essentially from the definition of $T_n$, we know that $T_n=1+2+\cdots+n$, and the sum of this arithmetic series is well-known, it is $n(n+1)/2$.  Thus 
$$T_n+T_{n-1}=\frac{(n)(n+1)}{2}+\frac{(n-1)(n)}{2}=n^2,$$
and therefore the sequence $(T_n)$ satisfies the recurrence $T_n=n^2-T_{n-1}$.
This completes the proof.
The general idea is quite useful, since in combinatorics, explicit formulas are (after a while) relatively uncommon, but recurrences are quite common.
A: For each pair of squares:
$(n+1)^2-n^2=2n+1=(n+1)+n$
From which the result follows for an even number of terms. For an odd number of terms add $-0^2$ to the end of the sequence, to get an even number of terms with the same sum.
