# Recurrence relation in series with parameter $k$

I was given a recurrence relation of this series: $$a_{n+1} = k -a_n$$ $S_n$ is the sum of $n$ first terms of the series. So I was given that $$S_{101} = 353$$ $$S_{199} = 696$$ With this information I need to find $a_1$ and $k$.

I found that if $$a_{n+1} = k -a_n$$ Then \begin{align} \ a_{n+2} & = k - a_{n+1} \\ & = k - (k-a_n) \\ \end{align} So $$a_{n+2} = a_n$$

I thought that I could find sums by thinking that the series above is an arithmetic progression, $d = 0$ but it didn't help. Later, I thought that it would be a geometric series, the ratio being $r=1$.

The sum of geometric series would be: $$S_n = \frac{a_1(r^n-1)}{r-1}$$ Thus, $r$ can't be $1$.

Any help?

• You are right, except that $r=-1$ ! – Yves Daoust Feb 16 '16 at 17:27
• @YvesDaoust Why? – Pichi Wuana Feb 16 '16 at 17:34
• How did you conclude that $r=1$ ? – Yves Daoust Feb 16 '16 at 17:44
• @YvesDaoust because if it's always the same number then $a_1 * 1 = a_2$ – Pichi Wuana Feb 16 '16 at 17:50
• Nope, $a_1\ne a_2$. What you have is $a_1=a_3$. – Yves Daoust Feb 16 '16 at 17:53

You have reached the conclusion that $a_n=a_{n+2}$.

Now all you have left is to solve the following system of two equations in two variables:

• $51a_1+50a_2=353$
• $100a_1+99a_2=696$

The solution is $a_1=3$ and $a_2=4$.

And then of course, $k=a_1+a_2=7$.

• Oh... right! I thought I would need sum equations. Thanks. – Pichi Wuana Feb 16 '16 at 17:19
• @PichiWuana: You're welcome :) – barak manos Feb 16 '16 at 17:19

Let's just unroll the recurrence relation.

$a_2 = k - a_1$

$a_3 = k - a_2 = k - (k - a_1) = a_1$

$a_4 = k - a_3 = k - a_1 = a_2$

$\cdots$

What do you find?

All odd terms in the sequence is simply $a_1$

All even terms in the sequence is simply $a_2$

The rest is trivial.

$\sum\limits_{i = 1}^{101}a_i = \sum\limits_{i = 1}^{51}a_{2i - 1} + \sum\limits_{i = 1}^{50}a_{2i} = 51a_1 + 50a_2 = 353$

$\sum\limits_{i = 1}^{199}a_i = \sum\limits_{i = 1}^{100}a_{2i - 1} + \sum\limits_{i = 1}^{99}a_{2i} = 100a_1 + 99a_2 = 696$

Solving, we get $a_1 = 3$ and $a_2 = 4$, so $a_2 = k - a_1 \implies 4 = k - 3 \implies k = 7$