# Math Help - Number sequences

1. ## Number sequences

This has been bugging me for a while:

If I have a number sequence for example, 1, 2, 4, 7, 11
So its like adding 1 then 2 then 3 then 4 and so on..

How would I write it in terms of n?

Also,

My teacher had a method which I dodnt write down in year 9 (am now in year 11) that you wrote a number sequence then drew an arrow down to the number sequence in the question and saw the relationship im wondering if anyone is familiar with that?

2. Originally Posted by Trin769
This has been bugging me for a while:
If I have a number sequence for example, 1, 2, 4, 7, 11
Go to this site and simply type in the sequence.
The On-Line Encyclopedia of Integer Sequences

I do hate these problems because I think they serve no purpose.

3. $f(1) = 1, \ f(n)=\frac{n(n+1)}{2} +1 \mbox{ for } n >1$

4. Originally Posted by VENI

$f(1) = 1, \ f(n)=\frac{n(n+1)}{2} +1 \mbox{ for } n >1$
that's not quite right becasue it doesn't give us the second term, which is 2. the correct form is this: $f(n)=\frac{n(n-1)}{2} + 1, \ n \geq 1.$

5. ## check this out!!

If u closely see the sequence......u can come up with this relation

f(n) = f(n-1) + n-1 where f(1)=1 ---------(1)

f(n) = f(n-1) + n-1 //Now substitute for f(n-1) using ----(1)
= [f(n-2) + n-2] + n-1
= f(n-2) + 2n -(1+2)
= [f(n-3) + n-3)] + 2n -(1+2) //Now substitute for f(n-2) using ---(1)
= f(n-3) +3n - (1 + 2 + 3)
....
....
= f(n-k) + kn -(1+2+3 +.......k)

Now we know the value of f(1)=1.....soo.....to make f(n-k) =f(1).....n-k=1 => k=n-1
then the abv becmes....

=f(1) + (n-1)n -(n-1)n/2
=1 + n(n-1)/2

Done!!

6. Thanks so much for all the replies

But it seems awfully complicated - I am doing GCSE maths at the moment.. :S

Is there an easier way to work out a number sequence which isnt linear?

7. Hello, Trin769!

Is there an easier way to work out a number sequence which isn't linear?

If we know that the formula is a quadratic, there is a sneaky way,
. . but you may need some background.

We begin with a basic quadratic function: . $f(n) \:=\:\frac{n(n+1)}{2}$

This generates the Triangular Numbers: 1, 3, 6, 10, 15, . . .

And it should be obvious why they are called "triangular."
Code:
                                          o
o             o   o
o         o   o         o   o   o
o     o   o     o   o   o     o   o   o   o

1       3           6               10

So we have the formula: . $T(n) \:=\:\frac{n(n+1)}{2}$

. . and we will modify it to fit the given sequence: 1, 2, 4, 7, 11, 16, 22, . . .

For the first few values, compare our sequence $a(n)$ to the triangular numbers $T(n)$

. . $\begin{array}{c||ccccccc}
n & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline\hline
a(n) & 1 & 2 & 4 & 7 & 11 & 16 & 22 \\
T(n) & 1 & 3 & 6 & 10 & 15 & 21 & 28 \end{array}$

The values of $T(n)$ do not match those of $a(n).$
. . Some adjustments are necessary . . . let's examine them.

. . $\begin{array}{c||ccccccc}
n & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline\hline
a(n) & 1 & 2 & 4 & 7 & 11 & 16 & 22 \\
T(n) & 1 & 3 & 6 & 10 & 15 & 21 & 28 \\ \hline
{\color{red}\text{adj}} & {\color{red}\text{-}0} & {\color{red}\text{-}1} & {\color{red}\text{-}2} & {\color{red}\text{-}3} & {\color{red}\text{-}4 }& {\color{red}\text{-}5} & {\color{red}\text{-}6}
\end{array}$

We see that we must subtract a number one less than $n.$

. . Hence: . $a(n) \;=\;T(n) - (n-1)$

And we have: . $a(n) \;=\;\frac{n(n+1)}{2} - (n-1)$

. . Therefore: . $\boxed{a(n) \;=\;\frac{n^2-n+2}{2}}$

8. Thanks so much Soroban! I actually get that

*victory dance*