Closed Form For $C_n=-C_{n-1}+2$

83 Views Asked by At

$C_n=-C_{n-1}+2$ where $C_0=0$

$C_n=D_n+d$ and $D_n=-D_{n-1}$

Now

$(C_n=) D_n+d=-(D_{n-1}+d)+2 \iff D_n=-D_{n-1}-d-d+2\iff D_n=-D_{n-1}-2d+2$

Setting $-2d+2=0\iff d=1$

Setting $n=0$

$0=D_0+1$ So $D_0=-1$

$C_n=D_n+1=-1(-1)^n+1$

Is the way is correct? is the answer is correct?

4

There are 4 best solutions below

0
On BEST ANSWER

The way contains interesting ideas. Let us consider it in details.

At first, the task is not homogenius, but the substitution $$D_n = C_n-1\tag1$$ changes it to the homogenius form $$D_n = - D_{n-1}\tag2.$$ Let $D_0=d,$ then $$D_{2n}=d,\quad D_{2n-1}= -d.\tag3.$$ The next step is returning to the issue variables: $$\boxed{C_{2n}=d+1,\quad C_{2n-1}= -d+1}.$$

0
On

Your mistake is that you've confused your sequence with the homogeneous sequence satisfying $$C_n=-C_{n-1}+2C_{n-2}.$$ However, you can still reduce your sequence to homogeneous one getting rid of the constant term as described at the section Sequences satisfying non-homogeneous recurrences.

0
On

I'm not sure why you bring in the sequence $D_n$, but your answer of $C_n=1-(-1)^n$ is correct. You can prove it by induction on $n$. Firstly, $C_0=0=1-(-1)^{0}$. Now, assuming that $C_{n-1}=1-(-1)^{n-1}$, we have $$C_n=-C_{n-1}+2=-(1-(-1)^{n-1})+2=1+(-1)^{n-1}=1-(-1)^n.$$

0
On

Suppose that $\, C_n \!=\! -C_{n-1} \!+\!2 \,$ for all $\, n. \,$ Then $\, C_n \!+\!C_{n-1} \!=\! 2 \,$ by algebra. Substitute $\, n\!+\!1 \,$ for $\, n\,$ giving $\, C_{n+1} \!+\! C_n \!=\! 2. \,$ Using the two equations we get $\, C_{n+1} = C_{n-1} \,$ for all $\, n. \,$ This implies the period of the sequence is $\,2.\,$ Thus $\, C_n \!=\! C_0 \,$ for all even $\, n \,$ and $\, C_n \!=\! C_1 \!=\! 2 \!-\! C_0 \,$ for all odd $\, n.\,$

For the case where $\, C_0 = 0, \,$ this is twice OEIS sequence A000035 which gives several formulas for the sequence. For example, $\, C_n = 2 (\sin (n \pi/2))^2 = 1 - (-1)^n = 2n - 4\lfloor n/2 \rfloor \,$ among others.

As the other answers demonstrate, there are many ways to find a solution to this prolem because it is so simple. Some of the ways are special cases of general methods. However, in my opinion, and in general, the simplest methods are the most reliable, most useful and are usually better to use.