# Finding a formula for the nth term of the sequence

• Sep 30th 2013, 01:24 PM
gfbrd
Finding a formula for the nth term of the sequence
Hello I need some help with this problem.

Find a formula for the nth term of the sequence.
1,0,0,1,0,0,0,0,1,0

so far I looked at the indexes of where 1s appear but I am not sure where to go from there and how to create a formula for this problem. I hope someone can explain to me the steps on how to solve this problem thanks.
• Sep 30th 2013, 01:34 PM
HallsofIvy
Re: Finding a formula for the nth term of the sequence
So far you have shown only 10 terms of the sequence. How are we to know that the sequence doesn't go 1,0,0,1,0,0,0,0,1,0, 2, 2, 2, ... or 1,0,0,1,0,0,0,0,1,0, 1000000, 2000000, 3000000, ...?

In other words NO finite number of terms implies a specific rule. Unless there is more given in this problem, there is no way to know how it continues. Do have some reason to think there might be an exponential or similar rule? Of course, there exist a unique 9th degree polynomial equation that fits exactly those 10 points?
• Sep 30th 2013, 03:56 PM
gfbrd
Re: Finding a formula for the nth term of the sequence
Sorry I forgot to metion that I am only given the first 10 terms of the sequence and I am supposed to find a formula for it
• Sep 30th 2013, 04:23 PM
SlipEternal
Re: Finding a formula for the nth term of the sequence
Let's look at the terms that have a 1:

1, 4, 9

So, my guess:

The $\displaystyle n$-th term would be 1 if $\displaystyle n$ is a perfect square and 0 otherwise.
• Sep 30th 2013, 06:23 PM
HallsofIvy
Re: Finding a formula for the nth term of the sequence
But slipEternal is correct that that is a guess. There is no mathematical reason that a sequence starting with those 10 terms could not have any succeeding terms at all. What he gives is perhaps the simplest formula but I see no where that was specified.
• Sep 30th 2013, 09:52 PM
gfbrd
Re: Finding a formula for the nth term of the sequence
I see since I am only given the first 10 terms, it is probably safe to assume the most obvious pattern. As long as the formula satisfies all 10 terms then it will be correct.
I understand the pattern between the indexes but, how do you I use the indexes to create a formula for the nth term?
• Oct 1st 2013, 04:49 AM
Shakarri
Re: Finding a formula for the nth term of the sequence
You wont be able to write a single formula for it, you will need to write is as a function with two cases like so,

$\displaystyle T_n= \begin{cases}1,& \text{if }\\ 0, & \text{if}\end{cases}$

Where Tn is the nth term. Fill in what comes after "if" with the condition that makes the nth term 1 or 0
• Oct 1st 2013, 07:07 AM
Plato
Re: Finding a formula for the nth term of the sequence
Quote:

Originally Posted by Shakarri
You wont be able to write a single formula for it, you will need to write is as a function with two cases like so,

Not true. Assuming relpy #4 is correct (or at least what was meant) then $\displaystyle {x_n} = 1 - \left\lceil {\sqrt n - \left\lfloor {\sqrt n } \right\rfloor } \right\rceil$
• Oct 1st 2013, 07:24 AM
Soroban
Re: Finding a formula for the nth term of the sequence
Hello, gfbrd!

Is this a trick question?
There are (at least) two possible interpretations of the sequence.

Quote:

$\displaystyle \text{Find a formula for the }n^{th}\text{ term of the sequence: }\:1,0,0,1,0,0,0,0,1,0,\text{ . . . }$

$\displaystyle \text{We have: }\:1,\underbrace{0,0}_{\text{2 zeros}},1,\underbrace{0,0,0,0,0}_{\text{4 zeros}},1, \underbrace{0,0,0,0,0,0}_{\text{6 zeros}},1,\underbrace{0,0,0,0,0,0,0,0}_{\text{8 zeros}},1, \text{ . . . }$

$\displaystyle \text{Also: }\:1,\underbrace{0,0}_{\text{2 zeros}},1,\underbrace{0,0,0,0}_{\text{4 zeros}},1,\underbrace{0,0,0,0,0,0,0,0}_{\text{8 zeros}},1,\underbrace{0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0}_{\text{16 zeros}},1,\text{ . . . }$
• Oct 1st 2013, 08:39 AM
SlipEternal
Re: Finding a formula for the nth term of the sequence
Ok, so we have:
$\displaystyle a_n = 1-\left\lceil \sqrt{n} - \lfloor \sqrt{n} \rfloor \right\rceil$ gives the sequence $\displaystyle 1,\underbrace{0,0}_{\text{2 zeros}},1,\underbrace{0,0,0,0}_{\text{4 zeros}},1, \underbrace{0,0,0,0,0,0}_{\text{6 zeros}},1,\underbrace{0,0,0,0,0,0,0,0}_{\text{8 zeros}},1, \text{ . . . }$

$\displaystyle b_n = 1 - \left\lceil \dfrac{\left| \lfloor \log_2(n+2) \rfloor + 2^{\lfloor \log_2(n+2) \rfloor} -2-n \right| }{n} \right\rceil$ gives the sequence $\displaystyle 1,\underbrace{0,0}_{\text{2 zeros}},1,\underbrace{0,0,0,0}_{\text{4 zeros}},1,\underbrace{0,0,0,0,0,0,0,0}_{\text{8 zeros}},1,\underbrace{0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0}_{\text{16 zeros}},1,\text{ . . . }$

And
$\displaystyle c_n = 3 - \left\lceil \dfrac{n+9}{10} - \left\lfloor \dfrac{n+9}{10} \right\rfloor \right\rceil - \left\lceil \dfrac{n+6}{10} - \left\lfloor \dfrac{n+6}{10} \right\rfloor \right\rceil - \left\lceil \dfrac{n+1}{10} - \left\lfloor \dfrac{n+1}{10} \right\rfloor \right\rceil$ gives for all $\displaystyle n \ge 0$:
\displaystyle \begin{align*}c_{10n+1} & = c_{10n+4} = c_{10n+9} = 1 \\ c_{10n+2} & = c_{10n+3} = c_{10n+5} = c_{10n+6} = c_{10n+7} = c_{10n+8} = c_{10n+10} = 0\end{align*}

Edit: Fixed $\displaystyle b_n$
• Oct 1st 2013, 06:30 PM
gfbrd
Re: Finding a formula for the nth term of the sequence
Thank you everyone for your help
yea this question gotten me a bit confused as to how to work with it I will look through all of your work and see if I can figure something out thank you again.