Star Hype News.

Premium celebrity moments with standout appeal.

news

Finding the formula of a sequence.

By Sebastian Wright
$\begingroup$

I have a sequence $\{0,1,1,2,2,3,3,4,4,5,5,...\}$ and I am supposed to find a formula for the n-th term. I do not see a pattern between the terms except that each positive integer is repeated twice. I cannot see a relation between each term to determine whether it is arithmetic or geometric. Is there a strategy to find the formula of a sequence that is neither arithmetic or geometric?

$\endgroup$

3 Answers

$\begingroup$

Hint: each term $a_n$ equals the previous term, plus $0$ if the previous term was even (i.e. $n$ of $a_n$ was even), or plus $1$ if the previous term was odd (i.e. if $n$ of $a_n$ was odd).

Edit: here's a perfectly legitimate formula. Note that I index $n$ at $0$. Adjust for your purposes if necessary.

$$a_n = \begin{cases}\frac{n}2, n \text{ even} \\ \frac{n+1}{2}, n \text{ odd} \end{cases}$$

Edit 2: if your book does not allow piecewise functions, then there's a handy trick: we use $(-1)^n$ to give us a $-1$ when $n$ is odd and $1$ when $n$ is even. From there, we can reconstruct our piecewise function:

$$a_n = \frac{n+x}{2} $$ Where we need $x = 0$ when $n$ is even, and $x=1$ when $n$ is odd. A sufficient $x$ will be $$x = \frac{1 + (-1)^n}{2}$$ Note that when $n$ is odd, we'll have $\frac{1+(-1)}{2} = \frac02$, and when $n$ is even, we'll have $\frac{1+1}{2} = \frac22 = 1$. Success!

So then we let $$a_n = \frac{n+\frac{1+(-1)^n}{2}}{2}$$ and we are done.

Unfortunately I cannot supply you with a good intuitition for how to 'see' that you need $x = \frac{1 + (-1)^n}{2}$. Of course, we want it to give either $0$ or $1$, and the way to create a $0$ a $1+(-1)$, but apart from that, this is just one of those things you have to play with to understand and remember. Using $(-1)^n$ is a very useful trick.

$\endgroup$ 4 $\begingroup$

$$a_1=floor(\frac{1}{2})$$ $$a_2=floor(\frac{2}{2})$$ $$a_3=floor(\frac{3}{2})$$ $$:$$ $$a_n=floor(\frac{n}{2}) $$

$\endgroup$ $\begingroup$

First approximate it by something linear: $a_n \approx \frac{n}{2}$

Now make a new sequence of the errors: $b_n = a_n - \frac{n}{2}$

$b_n$ starts: -1/2 , 0, -1/2, 0, -1/2, ...

Seems like $b_n = \frac{-1 + (-1)^n}{4}$ does the trick.

So $a_n = \frac{n}{2} + \frac{-1 + (-1)^n}{4} = \frac{2n - 1 - (-1)^{n}}{4}$

$\endgroup$ 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy