Welcome to our community

Be a part of something great, join today!

[SOLVED] Convert the recursive formula into the explicit form

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
Hey!! :eek:

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? (Wondering)
 

Olinguito

Well-known member
Apr 22, 2018
251
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
Mar 5, 2012
8,687
Hey!! :eek:

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? (Wondering)
$$\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}$$
(Thinking)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
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}$$
(Thinking)
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?

(Wondering)
 
Last edited:

Olinguito

Well-known member
Apr 22, 2018
251
$$\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. (Nod)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
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. (Nod)
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)$$ ? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,687
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$. (Nerd)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,687
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
Apr 14, 2013
4,007
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*} ? (Wondering)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
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? (Wondering)
 
Last edited:

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,687
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.
All posts in this thread follow that definition. (Angel)

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$. (Smirk)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
It's still a telescoping sum - after we multiply every other line with $-1$. (Smirk)
Ah ok! So on the left side we get $a_{n+1}$ but which sum do we get on the right sum? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,687
Ah ok! So on the left side we get $a_{n+1}$ but which sum do we get on the right sum? (Wondering)
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? (Wondering)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
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? (Wondering)
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? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,687
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?
(Nod)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,007
Thanks a lot!! (Sun)