Find the value of k.

105 Views Asked by At

I have trouble understanding how to solve this question. I understand how when $n$ is $0$, the value is $0$, but do not understand how to calculate the value of $k$ based on this.

The first element of the sequence $a_1=0$, and if $n\geq 1$ then $a_{n+1} = a_n + (-1)^n\cdot n$. Find the value of $k$ if $a_k = 2013$.

3

There are 3 best solutions below

7
On BEST ANSWER

Hint: You have for any $n\geq 1$ that $$a_n=\begin{cases}(n-1)/2&n\text{ odd}\\-n/2&n\text{ even}\end{cases}$$.

You can prove this by induction on $n$.

Thus for $a_k=2013$, $k$ is odd as $2013>0$ and thus $2013=(k-1)/2$.


Edit: See below for a sketch of the proof:

As an induction base, let $n=1$, then $a_1=0$ and $(n-1)/2=0$.

For the induction step, let $a_n$ satisfy the formula for some $n$. we divide between the cases if $n$ is even or odd:

If $n$ is odd, then $a_n=(n-1)/2$ and $n+1$ is even. Now, $a_{n+1}=a_n+(-1)^n\cdot n$. By the induction hypothesis and as $n$ is odd, you have $a_{n+1}=(n-1)/2-n$, i.e. $a_{n+1}=n/2-1/2-n=-n/2-1/2=-(n+1)/2$.

If $n$ is even, you have $a_n=-n/2$ and $n+1$ is odd. Now, again $a_{n+1}=-n/2+n=n/2$ by the induction hypothesis and as $n$ is even. Now, $a_{n+1}=n/2=((n+1)-1)/2$.


Edit: Based on the suggestion of OP: To calculate the first few terms, we start with the given $a_1=0$. Then

  • $a_2=a_{1+1}=a_1+(-1)^1\cdot 1=-1$
  • $a_3=a_{2+1}=a_2+(-1)^2\cdot 2=-1+2=1$
  • $a_4=a_{3+1}=a_3+(-1)^3\cdot 3=1-3=-2$
  • ...
0
On

It doesn't take long to realize that the even $n$ correspond to a decreasing, negative sequence, and the odd $n$ to an increasing, non-negative one. So $k$ must be odd.

Then

$$a_{2n+1}=a_{2n}+(-1)^{2n}2n=a_{2n-1}+(-1)^{2n}2n+(-1)^{2n-1}(2n-1)=a_{2n-1}+1$$

and by induction

$$\color{green}{a_{2n+1}=n}.$$

Hence

$$k=2\cdot2013+1.$$

0
On

This would probably work (telescoping sum):

$2013-a_{k-1}=(-1)^{k-1}(k-1)$

$a_{k-1}-a_{k-2} =(-1)^{k-2}(k-2)$

........

$a_{2}-a_{1} = (-1)^1(1)$

So summing both sides we get $2013-a_{1}= \sum_{n=1}^{k}(-1)^n(n-1) $

Then you could split that sum into odd and even terms and use sum of first k terms formula to get a quadratic in $k$ - then solve for k.