# [SOLVED]Convert the recursive formula into the explicit form

#### mathmari

##### Well-known member
MHB Site Helper
Hey!!

We have the sequence $$0, \ 2 , \ -6, \ 12, \ -20, \ \ldots$$ Its recursive definition is \begin{align*}&a_1=0 \\ &a_{n+1}=(-1)^{n+1}\cdot (a_n+2\cdot n)\end{align*} or not?
How can we convert that in the explicit form?

#### Olinguito

##### Well-known member
It is easiest first of all to ignore the $(-1)^{n+1}$ and consider the sequence
$$0,2,6,12,20,\ldots.$$
We can add the necessary minus signs later on.

This sequence is thus $a_{n+1}=a_n+2n$ i.e. $a_{n+1}-a_n=2n$. We can therefore use telescoping to get an explicit formula:
$$\begin{array}{rcl}a_{n+1}-a_n &=& 2n \\ a_n-a_{n-1} &=& 2(n-1) \\ {} &\vdots& {} \\ a_2-a_1 &=& 2\cdot1\end{array}$$
$\displaystyle\implies\ a_{n+1}-a_1=2\sum_{r=1}^nr=2\cdot\frac{n(n+1)}2=n(n+1)$,

i.e. $a_n=n(n-1)$. To restore the minus signs, simply add the $(-1)^{n+1}$ back:
$$\boxed{a_n\ =\ (-1)^{n+1}n(n-1)}.$$

PS: The formula for the original sequence $0,2,-6,12,-20,\ldots$ should be
$$a_1=0;\ a_{n+1}=a_n+(-1)^{n+1}\cdot2n.$$
If it were
\begin{align*}&a_1=0 \\ &a_{n+1}=(-1)^{n+1}\cdot (a_n+2\cdot n)\end{align*}
the fourth term would be $0$, not 12.

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hey!!

We have the sequence $$0, \ 2 , \ -6, \ 12, \ -20, \ \ldots$$ Its recursive definition is \begin{align*}&a_1=0 \\ &a_{n+1}=(-1)^{n+1}\cdot (a_n+2\cdot n)\end{align*} or not?
How can we convert that in the explicit form?
$$\boxed{a_n\ =\ (-1)^{n+1}n(n-1)}.$$
Hey mathmari and Olinguito !!

Just an observation:
$$\begin{array}{c|c|c|c|}n & a_n & a_{n+1}=(-1)^{n+1}\cdot (a_n+2\cdot n) & a_n\ =\ (-1)^{n+1}n(n-1) \\ \hline 1 & 0 & 0 & 0\\ 2 & 2 & (-1)^{1+1}\cdot(0+2\cdot 1) = 2 & (-1)^{2+1}\cdot 2 (2-1)={\color{red}-2}\\ 3 & -6 & (-1)^{1+2}\cdot(2+2\cdot 2) = -6 \\ 4 & 12 & (-1)^{1+3}\cdot(-6+2\cdot 3) = {\color{red}0} \\ 5 & -20 \\ \end{array}$$

#### mathmari

##### Well-known member
MHB Site Helper
ust an observation:
$$\begin{array}{c|c|c|c|}n & a_n & a_{n+1}=(-1)^{n+1}\cdot (a_n+2\cdot n) & a_n\ =\ (-1)^{n+1}n(n-1) \\ \hline 1 & 0 & 0 & 0\\ 2 & 2 & (-1)^{1+1}\cdot(0+2\cdot 1) = 2 & (-1)^{2+1}\cdot 2 (2-1)={\color{red}-2}\\ 3 & -6 & (-1)^{1+2}\cdot(2+2\cdot 2) = -6 \\ 4 & 12 & (-1)^{1+3}\cdot(-6+2\cdot 3) = {\color{red}0} \\ 5 & -20 \\ \end{array}$$
Ah should it maybe be $$a_{n+1}=(-1)^{n+1}\cdot (|a_n|+2\cdot n)$$ ?

Because if we consider the sequence without the signs, we add at the previous number the number 2n. Then the sign changes, at the odd positions we have $-$ and at the even places we have $+$, or not?

Last edited:

#### Olinguito

##### Well-known member
$$\begin{array}{c|c|c|c|}n & a_n & a_{n+1}=(-1)^{n+1}\cdot (a_n+2\cdot n) & a_n\ =\ (-1)^{n+1}n(n-1) \\ \hline 1 & 0 & 0 & 0\\ 2 & 2 & (-1)^{1+1}\cdot(0+2\cdot 1) = 2 & (-1)^{2+1}\cdot 2 (2-1)={\color{red}-2}\\ 3 & -6 & (-1)^{1+2}\cdot(2+2\cdot 2) = -6 \\ 4 & 12 & (-1)^{1+3}\cdot(-6+2\cdot 3) = {\color{red}0} \\ 5 & -20 \\ \end{array}$$
Thanks, ILS. When the first term is $0$ it’s easy to slip into thinking it’s $a_0$ rather than $a_1$. In this case the formula should be
$$\boxed{a_n\ =\ (-1)^nn(n-1)}.$$

Ah should it maybe be $$a_{n+1}=(-1)^{n+1}\cdot (|a_n|+2\cdot n)$$ ?
Yes, that should work.

#### mathmari

##### Well-known member
MHB Site Helper
Thanks, ILS. When the first term is $0$ it’s easy to slip into thinking it’s $a_0$ rather than $a_1$. In this case the formula should be
$$\boxed{a_n\ =\ (-1)^nn(n-1)}.$$

Yes, that should work.
So, is the recursive formula \begin{align*}&a_0=0 \\ &a_{n+1}=(-1)^{n+1}\cdot (|a_n|+2\cdot n)\end{align*} and the explicit formula $$a_n\ =\ (-1)^nn(n-1)$$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
So, is the recursive formula \begin{align*}&a_0=0 \\ &a_{n+1}=(-1)^{n+1}\cdot (|a_n|+2\cdot n)\end{align*} and the explicit formula $$a_n\ =\ (-1)^nn(n-1)$$ ?
Yes.
And an alternative form for the recursive formula is $a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n$.

#### mathmari

##### Well-known member
MHB Site Helper
Yes.
And an alternative form for the recursive formula is $a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n$.
Why is $(-1)^{n+1}|a_n|=-a_n$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Why is $(-1)^{n+1}|a_n|=-a_n$ ?
Because $a_n$ alternates in sign.
That is, when $n$ is even, $a_n$ is positive.
And when $n$ is odd, $a_n$ is negative with a special case for $n=1$ since $a_1=0$.

#### mathmari

##### Well-known member
MHB Site Helper
Because $a_n$ alternates in sign.
That is, when $n$ is even, $a_n$ is positive.
And when $n$ is odd, $a_n$ is negative with a special case for $n=1$ since $a_1=0$.
I got stuck right now.. Do we have $a_0=0$ or $a_1=0$ ?

I mean do we have \begin{align*}&a_0=0 \\ &a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n\end{align*} or \begin{align*}&a_1=0 \\ &a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n\end{align*} ?

#### mathmari

##### Well-known member
MHB Site Helper
From $$a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n\Rightarrow a_{n+1}+ a_n = (-1)^{n+1}\cdot 2n$$ we get the following equations $$a_{n+1}+ a_n = (-1)^{n+1}\cdot 2n \\ a_{n}+ a_{n-1} = (-1)^{n}\cdot 2(n-1) \\ a_{n-1}+ a_{n-2} = (-1)^{n-1}\cdot 2(n-2) \\ \vdots \\ a_{2}+ a_1 = (-1)^{2}\cdot 2\cdot 1$$ so we don't get an telescoping sum, do we?

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I got stuck right now.. Do we have $a_0=0$ or $a_1=0$ ?

I mean do we have \begin{align*}&a_0=0 \\ &a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n\end{align*} or \begin{align*}&a_1=0 \\ &a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n\end{align*} ?
In post #1 we were given that $a_1=0$ and $a_0$ is presumably undefined.

From $$a_{n+1}=- a_n + (-1)^{n+1}\cdot 2n\Rightarrow a_{n+1}+ a_n = (-1)^{n+1}\cdot 2n$$ we get the following equations $$a_{n+1}+ a_n = (-1)^{n+1}\cdot 2n \\ a_{n}+ a_{n-1} = (-1)^{n}\cdot 2(n-1) \\ a_{n-1}+ a_{n-2} = (-1)^{n-1}\cdot 2(n-2) \\ \vdots \\ a_{2}+ a_1 = (-1)^{2}\cdot 2\cdot 1$$ so we don't get an telescoping sum, do we?
It's still a telescoping sum - after we multiply every other line with $-1$.

#### mathmari

##### Well-known member
MHB Site Helper
It's still a telescoping sum - after we multiply every other line with $-1$.
Ah ok! So on the left side we get $a_{n+1}$ but which sum do we get on the right sum?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Ah ok! So on the left side we get $a_{n+1}$ but which sum do we get on the right sum?
Let's consider 2 cases: $n+1$ is even, and $n+1$ is odd.
And let's start with the first one ($n+1$ is even).
What will those equations looks like then? It should simplify them, shouldn't it?

#### mathmari

##### Well-known member
MHB Site Helper
Let's consider 2 cases: $n+1$ is even, and $n+1$ is odd.
And let's start with the first one ($n+1$ is even).
What will those equations looks like then? It should simplify them, shouldn't it?
If $n+1$ is even we get $$2n+2(n-1)+2(n-2)+\ldots +2\cdot 2+2\cdot 1=2\sum_{i=1}^{n}i=2\cdot \frac{n(n+1)}{2}=n(n+1)$$
If $n+1$ is odd we get $$-2n-2(n-1)-2(n-2)-\ldots -2\cdot 2-2\cdot 1=-2\sum_{i=1}^{n}i=-2\cdot \frac{n(n+1)}{2}=-n(n+1)$$

Is everything correct?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
If $n+1$ is even we get $$2n+2(n-1)+2(n-2)+\ldots +2\cdot 2+2\cdot 1=2\sum_{i=1}^{n}i=2\cdot \frac{n(n+1)}{2}=n(n+1)$$
If $n+1$ is odd we get $$-2n-2(n-1)-2(n-2)-\ldots -2\cdot 2-2\cdot 1=-2\sum_{i=1}^{n}i=-2\cdot \frac{n(n+1)}{2}=-n(n+1)$$

Is everything correct?

MHB Site Helper
Thanks a lot!!