Basic arithmetic/calculus.
In the series: Note 21.

Subject: Sequences and Series

Date : 12 March 2020
Version: 0.2
By: Albert van der Sel
Doc. Number: Note 21.
For who: for beginners.
Remark: Please refresh the page to see any updates.

Status: Ready


This note is especially for beginners.

Maybe you need to pick up "some" basic "mathematics" rather quickly.
So really..., my emphasis is on "rather quickly".

So, I am not sure of it, but I hope that this note can be of use.
Ofcourse, I hope you like my "style" and try the note anyway.


This note: Note 21: Sequences and Series.

The material in this text, should be more or less on the level of Highschool math
as I have observed in several European countries.

Each note in this series, is build "on top" of the preceding ones.
Please be sure that you are on a "level" at least equivalent to the contents up to, and including, note 20.


Contents:

1. Introduction Sequences.

  1.1 The "Arithmetic" sequence.
    1.1.1 The Recursive formula.
    1.1.2 The Direct formula.
  1.2 The "Geometric" sequence.
    1.2.1 The Recursive formula.
    1.2.2 The Direct formula.

2. The Sum formula's with sequences.

  2.1 The Σ notation.
  2.2 Confusion about u0 or u1? No way!
  2.3 The Sum formula's.


1. Introduction Sequences.

A sequence is a series of numbers (often infinite), but where a certain fixed relation
exists between those numbers.
It's not "just" a random row of numbers.

There are several "types" of sequences. The most important ones (Highschool math),
are the "Arithmetic" sequence and the "Geometric" sequence.

1.1 The "Arithmetic" sequence:

Let's take a look at this simple sequence:

(2, 4, 6, 8, 10, 12....)

It does not take too much effort to see what's going on here. It looks like that
the "current term" is equal to the "former term" + 2.
And this seems to be true for any term in the sequence.

So, suppose the current term is "8" (you are currently looking at "8"). You probably agree
that "8 = 6 + 2", so here we have indeed "current term" = "former term" + 2.

If you have found a relation between the "current term", and the next one (just before it,
or just after it), then that relation is called a recursive relation (or recursive formula).

1.1.1 The Recursive formula:

un = un-1 + 2

Here, "un" means the "n-th" term in the row, and "un-1" is the "(n-1)-th"
term in the row.

Note that the difference between any un and un-1, is constant. Here, in this example,
it happens to be the constant "2".

But why not choosing the relation between un and un+1? Sure, you can do
that as well. However, the convention is to write down the relation between un and un-1.

Any different sequence, will have it's own recursive formula, ofcourse.

In general, a Recursive relation of these type of sequences, is of the form:

un = un-1 + C

where C is some number (positive or negative number).

1.1.2 The Direct formula:

It's nice to have such recursive formula, as described above. But what if we want to determine
the 50th element, directly (that is, immediately)?
You can count all the way up, until you reach that term, but we can do better than that.

Since you add "2" all the time, you only need the term you start with. The starting term of the
sequence is often denoted by u0 or u1. There are no fundamental implications
on how you label that first term. But there are indeed a few subtleties involved.

For example, is the absolute 50th term, actually u49 or u50?
It depends on how you started the sequence, that is, counting from u0 or u1.
Or is it just that element, for which we require that un = u50?

=> If we have that sequence, labeled (starting) from u0, then what is the direct formula?:

(2, 4, 6, 8, 10, 12....) with u0=2. Then the absolute 50th term, corresponds to u49.
This is so since we started to label as of "0". But this absolute term is not what we want.
We want to calculate u50:

So u50, thus where n=50, is: u50=u0 + n*2 = 2 + 50*2=102.

We needed to start with u0 and add 50 steps of "2", meaning 50*2.

=>Suppose we have the *same* sequence, labeled (starting) from u1:

(2, 4, 6, 8, 10, 12....) with u1=2.

Then u50, thus where n=50: u50=u1 + (n-1)*2.

Why is this so? To make it "plausible", take a look at the numbers below:

u0 u1 u2 u3 u4 ...
2 4 6 8 10 ...
u1 u2 u3 u4 u5 ...

If you want to calculate "8", then:

-If starting from u0: u3 = 8 = u0 + 3*2.
-If starting from u1: u4 = 8 = u1 + (4-1)*2.

But here you might say: "Forgery! you calculate u3 and u4,
and then try to compare the results.

No.
If you start with u0, and calculate u4, you get "something".
If you start with u1, and calculate u4, you get "something different".

That's normal. Starting from the term u1, you are one "step" before the other
way of labeling the members.

Why don't we calculate the results for n=4? Let's do it:

-starting labeling from u0: then u4=10.
-starting labeling from u1: then u4=8.

You can also see that from the table above.

Now we know what the results must be: 10 and 8. You know what the sequence is, and you can easily
verify the values from the table. Now let's calculate, using the proposed recurisve formula's:

-starting labeling from u0: u4 = 10 = u0 + n*2 = 2 + 4*2 = 2 + 8 = 10.
-starting labeling from u1: u4 = 8 = u1 + (n-1)*2 = 2 + 3*2 = 2 + 6 = 8.

The above is not exactly "proof", but hopefully, you see that in general we have:

Direct formula with u0: un = u0 + C * n.
Direct formula with u1: un = u1 + C * (n-1).

where "C" is a constant, just like the "2" in our example.

It is very important to list a sequence, AND mention the starting label, like:

(-10, -7.5, -5, -2.5, 0, 2.5, 5...) with u0=-10.

About the direct formula: if you still have doubts, or something, do the excercise below.
It will certainly help.


The example studied above, is an example of an Arithmetic sequence.
This is called this way, since the "direct formula" resembles a linear equation like f(x)=ax+b.

Just like with a linear function, if you see a constant increase, or constant decrease, if you compare
any un with un-1, then we are dealing with an Arithmetic sequence.

This is exactly as it is, with any linear function: if you would look at discrete X'ses, like x=1, x=2, x=3 etc..,
then too we have that the difference between f(n) and f(n-1) is always constant, for any "n".

Excercise:

Suppose we have the sequence: (-10, -7.5, -5, -2.5, 0, 2.5, ...) with u0=-10.

-Question: Give the recursive formula.
Answer: un = un - 1 + 2.5

-Question: Give the direct formula.
Answer: un = u0 + 2.5 * n = -10 + 2.5 * n.

-Question: calculate u4, using the Direct formula.
Answer: u4= -10 + 2.5 * 4 = 0.

Question: suppose we have the same sequence, but now:
(-10, -7.5, -5, -2.5, 0, 2.5, ...) with u1=-10.
Calculate u4

Answer: u4 = u1 + 2.5 * (n-1) = -10 + 2.5 * 3 = -2,5.

Verify the latter answer, simply by counting as from u1 (follow the elements to the right, until n=4).
You will see that you will end at "-2.5".

With recursive relations, you do not have to worry at all, with respect to the starting element.
The recursive relation simply describes the relation between any un and adjacent un-1,
which is completely independent of the "starting point" of the sequence.

1.2 The "Geometric" sequence:

1.2.1 The recursive formula:

With the "Arithmetic" sequence, the difference between any un and un-1
is a constant number, like in the first example of section 1.1: un = un-1 + 2.

This time, with the "Geometric" sequence, it is a constant factor.

Here are two examples of Recursive relations:

un = 3 * un-1

un = ⅓ * un-1

The latter one, is the Recursive relation for example of the Geometric sequence:

(9, 3, 0, 1/3, 1/9, ....) with u0= -9

Just like with any type of sequence, here too we can start the sequence with the first term labeled
u0 or labeled u1.

As we know, a Recursive relation is not "tied" to the choice of starting with u0 or u1
as the starting term: it just relates any two "adjecent" terms un and un-1 of the sequence.
So, we only have one Recursive formula for a specific Geometric sequence.

General recursive formula for a Geometric sequence:

un = r * un-1     (with "r" as the factor like "4", or "10" or ⅓ etc...)

1.2.2 The Direct formula:

Now, let's turn our attention to the Direct formula's.

Between the two adjacent terms, un and un-1, we have a constant factor "r".
Between the two terms, un and un-2, we have a the factor "r*r" = r2.
Between the two term, un and un-3, we have a the factor "r*r*r" = r3.
etc...

It therefore seems plausible that un=u0 rn.

But, just as with the arithmetic sequence (with a similar reasoning), we have two formats:

Direct formula with u0: un = u0 * rn.
Direct formula with u1: un = u1 * rn-1

We already have covered quite some ground for sequences. But there is more, ofcourse.
For example, we need to study the "sum" formula's associated with the various forms of sequences.

Let's first do a nice excercise:

Excercise:

Suppose we have the sequence (8, 4, 2, 1, 1/2, 1/4, ....) with u0=8.

-Question: what is the recursive formula?
Answer: un = 1/2 * un-1

-Question: what is the direct formula?
Answer: un = u0 * (1/2)n

Let's compare "(8, 4, 2, 1, 1/2, 1/4, ....) with u0=8" and (8, 4, 2, 1, 1/2, 1/4, ....) with u1=8".

u0 u1 u2 u3 u4 ...
8 4 2 1 1/2 ...
u1 u2 u3 u4 u5 ...

You can easily construct the table: the next element is simply half of the former element.
So if the first element is "8", then the second is "4", the third is "2" etc..

-Question: If starting from u0, calculate u4, and compare the result with the table.
Use a formula listed above:

Answer: u4 = 8 * (1/2)4 = 1/2. This is in accordance with the table.

-Question: If starting from u1, calculate u4, and compare the result with the table.
Use a formula listed above:

Answer: u4 = 8 * (1/2)4-1 = 8 * (1/2)3 = 1. This is in accordance with the table.

2. The Sum formula's with sequences.

We have seen two types of sequences, the arithmetic- and geometric sequences.

For both types, it is true that you can sum up, say the first 7 elements, or first 10 elements,
or the first 25 elements, or any other range of elements.

Ofcourse, instead of manually adding the values yourself, there exists nifty formula's
to do it in one run. It's really simple.

2.1 The Σ notation:

First, let's review how to condensly represent a sum of values.

-If you want to condensly (or compactly) represent the sum of 11 consequtive values, it's common
to use the Σ symbol like in:

u1+u2+u3+ ... +u11 = Σi=111 ui

Ofcourse, here you could also sum up 20, 1000 or other "n" values.
This notation just represents a summation of "n" values (from u1 up to un).

2.2 Confusion about u0 or u1? No way!

When you need to calculate "some" sum of a number of elements from a sequence, then how is that
effected by starting the sequence from labeling as u0 or u1, if any?

There is no effect, although the formula's may "look" slightly different.

You know, they will always ask something like "give the sum of the first 9 elements...",
or "give the sum of the first 15 elements..." etc...

Take a look at the table below:

u0 u1 u2 u3 u4 u5 u6 u7 u8 u9 Here, the first 9 elements run from U0 to U8.
u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 Here, the first 9 elements run from U1 to U9.

What we can learn here is, that if we see:

- a task to sum up the first 9 elements (n=9) of a sequence which starts with labeling from u0, then:
we use Σn=08 un = Σn=0n-1 un.

- a task to sum up the first 9 elements (n=9) of a sequence which starts with labeling from u1, then:
we use Σn=19 un = Σn=1n un
You can check this using the table above. You will see that the reasoning is correct.

2.3 The nifty Sum Formula's:

In math, indeed any theorem should have an accompanying formal proof.
In many cases, however, when the need for "strickt formality" is not high, showing
that "something" looks plausible, is quite enough.

-Sum formula's for the arithmetic sequence:

-When we start labeling from u0:

Sum = Σn=0n-1 un = ½ * n * (u0 + un-1)

-When we start labeling from u1:

Sum = Σn=1n un = ½ * n * (u1 + un)

Both formula's can be read as:

Sum = ½ * NumberOfTerms * (FirstTerm + LastTerm).

It's plausible. You know that an arithmetic sequence is chacterized by a constant increase
or constant decrease between adjacent elements. You can see that clearly in the recursive- or
direct formula's.

Why is it plausible? The formula "almost looks" like an average. If you look at "Sum/NumberOfTerms", then it is
really an average. But for a linear constant increase, then thats exactly "half * (first + last)".
You can check that against any graph of a linear function.

Example:

Suppose we have the sequence (5, 10, 15, 20, ...) starting with u0.

-Question: Calculate the sum of the first 7 elements.

-Answer:

The recursive formula is: un = un-1 + 5 (actually, we do not need it).
The direct formula is: un = 8 + 5 * n.

Thus:

-u0=5 and
-u6= 8 + 5 * 6 = 38 (u6 is the 7th term).

Note that u0, u1, u2, u3, u4, u5, u6, are 7 terms.

Sum = ½ * 7 * (5 + 38) = 150.5

You see how easy the Sum formula works?

-Sum formula's for the geometric sequence:

-When we start labeling from u0:

Sum= un-u0
--------
    r-1

-When we start labeling from u1:

Sum= u(n+1)-u1
---------
    r-1

Here, "r" is ofcourse the factor as already was discussed in the recursive- and direct formula's, above.

Both formula's can be read as:

Sum= NextTerm - FirstTerm
-----------------
    factor - 1

Note: the "NextTerm" really is the first "next term" in your sequence.
So, if you have the task to calculate the sum of the first 20 terms, then your
NextTerm is term 21.

Example:

Suppose we have the sequence (9, 3, 1, 1/3, 1/9, ...) starting with u0.

-Question: Calculate the sum for the first 7 terms.

-Answer:

The recursive formula is: un = un-1 * ⅓ (actually, we do not need it).
The direct formula is: un = 9*(⅓)n.

-u0 = 9.
-u7 = 9*(⅓)7= (about) 0.000457 (using the 8th term = the "Next" term).

Sum= 0.000457 - 9
---------------
    -0.6666
= (about) 13.5

Note that the last few terms are so small, that the Sum can be roughly approximated
by (-9 / -0.666) = (9 / 0.666) = about 13.5. Ofcourse, you should always calculate
up to the significant digit, as might be stated in the task description.



That's it. Hope you liked it!