Originally Posted by

**Soroban** Hello, robocop_911!

Crank out the first few terms . . .

. . $\displaystyle \begin{array}{ccccccc}a_1 &=& 1 + (-1)^1 &=& 0 \\

& & & & \rangle & +3 \\

a_2 &=& 2 + (-1)^2 &=& 3 \\

& & & & \rangle & -1 \\

a_3 &=& 3 + (-1)^3 &=& 2 \\

& & & & \rangle & +3 \\

a_4 &=& 4 + (-1)^4 &=& 5 \\

& & & & \rangle & -1 \\

a_5 &=& 5 + (-1)^5 &=& 4 \\

& & & & \rangle & +3 \\

a_6 &=& 6 + (-1)^6 &=& 7 \end{array}$

We are alternately "adding 3 to" and "subtracting 1 from" the preceding term.

The recurrence is: . $\displaystyle a_n \;=\;a_{n-1} + 1 + 2(-1)^n$

We have:

. . $\displaystyle \begin{array}{ccccccccc}

a_1 &=& 1^2+1 &=& 2 \\

& & & & \rangle & +4 &=& 2(2) \\

a_2 &=& 2^2+2 &=& 6 \\

& & & & \rangle & +6 &=& 2(3) \\

a_3 &=& 3^2 + 3 &=& 12 \\

& & & & \rangle & +8 &=& 2(4) \\

a_4 &=& 4^2 + 4 &=& 20 \\

& & & & \rangle & +10 &=& 2(5) \\

a_5 &=& 5^2 + 5 &=& 30\end{array}$

Each term is: the preceding term, plus twice $\displaystyle n.$

The recurrence is: . $\displaystyle a_n \;=\;a_{n-1} + 2n$