SEQUENCE:
A sequence is a function from a subset of integers to a set . We use the notation to denote the image of the integer . We call a term of sequence
Doing an example will help
Examples:
If , find
-
We typically start from , so we would get:
-
So, since we are asked to find the set of values that create the sequence, we would get
Consider the sequence where , Find the first five elements of this sequence
- goes on to infinity and starts at zero, we denote this by .
- The first 5 elements, starting from zero would be:
- So, our sequence would look something like
Sequences of the form are often used in cs. These finite sequences are what we call strings
ARITHMETIC PROGRESSION:
An arithmetic progression is a sequence of the form
where the initial term and the common difference are REAL NUMBERS.
So,
Example:
If we are given and , what is the value of ?
GEOMETRIC PROGRESSION:
A geometric progression is a sequence of the form
where the initial term and the common ratio are REAL NUMBERS
So,
Example:
is a geometric progression. If we are given that , find
RECURSIVELY DEFINED SEQUENCES:
A recurrence relation for the sequence is an equation that expresses in terms of one or more of the previous terms of the sequence, namely , for all integers , and is a nonnegative number. In simpler terms, a recursive sequence is a sequence in which terms are defined using one or more previous terms along with the initial condition.
The most common recurrence formula is the Fibonacci sequence. The Fibonacci sequence, is defined by the initial conditions (or base cases) and and the recurrence relation
So, for example, if we wanted to find , it would look something like this:
CLOSED FORMULA:
While recursive formulas can come in handy, sometimes they can be a pain in the ass. So, if we take the Fibonacci sequence again, what if we wanted to find ? That is gonna be ridiculous to find, because they requires us to find all the terms before the 100th term, which is a LOT of work.
So, we want to find a non-recursive formula to calculate is called solving the recurrence relation. The solution is called a closed formula
Example:
Let be a sequence such that and . Find the closed formula for
It is important to note that not all recursive methods have closed formulas
SUMMATION:
Instead of writing , we can write , so this starts from all the way to , adding them all together
We also have if you recursively multiply numbers together, there is a symbol for this:
Example:
- Find
This is just 1+2+3+4+5=15
- Find
This is equal to:
, do the math you can figure it out
- Write as a sigma notation
. Which can also be written as
The most important ones you should know would be these:
first column is sum the second column is closed formula