The next mathematical object we’ll explore is an ordered collection. Unlike a set which is a loose collection of objects, for a sequence, order matters. For this reason, we can view a sequence simply as a function whose domain is the counting numbers. But since we will spend a lot of time in our mathematical career working with them (in this class and calc 2 for a start), we give sequences their own special notation.
Subsection
Definition4.1.1.Sequences.
A sequence is a function from a subset of the integers (usually \(\{0, 1,2,3 \dots\}\)) to a set \(S\text{.}\) We use the notation \(a_n\) to denote the image of the integer \(n\text{,}\) and we call \(a_n\) the \(n\)-th term of the sequence.
We will often write the shorthand \(\{a_n\}\) to denote the complete sequence where \(n\in \mathbb{N}\text{.}\)
It’s helpful to remember that \(a_n\) is just a new shorthand for a function. You can think of \(a_n\) as \(a(n)\text{,}\) with \(a\) is name of the function (sequence) and \(n\) is the input variable.
Although there are many different types of sequences, two common ones we’ll encounter regularly in this course are given below:
Definition4.1.3.Arithmetic and Geometric Sequences.
A arithmetic progression is a sequence of the form:
\begin{equation*}
a, a+d, a+2d, a+3d, \dots, a+nd, \dots
\end{equation*}
with the initial term \(a\) and the common difference \(d\text{.}\)
A geometric progression is a sequence of the form:
\begin{equation*}
a, ar, ar^2, ar^3, \dots, ar^n, \dots
\end{equation*}
with the initial term \(a\) and the common ratio \(r\text{.}\)
Notice that the arithmetic sequence is of the form \(a_n = a+nd\text{.}\) Since \(n\) is the variable and \(a \and d\) are constants, this is the form of a “\(y=mx + b\)”, so arithmetic sequences are the linear functions of sequences. The geometric on the other hand, is an exponential function.
The next type of sequences we encounter isn’t one we’ve encountered in the calculus courses. These sequences are defined in terms of themselves. Each value that is computed depends on the value that comes before it.
Consider the recurrence \(a_n = -3 a_{n-1} + 4 a_{n-2}\text{.}\) Are the following sequences solutions to the recurrence?
\(\displaystyle a_n = 0\)
\(\displaystyle a_n = 1\)
\(\displaystyle a_n = 2^n\)
\(\displaystyle a_n = (-4)^n\)
Note4.1.7.
A recurrence has a unique solution if it has initial data.
This would be a function defined with finite recursion, so the recurrence \(F_n = F_{n-1} + F_{n-2}\) with \(F_0 = 0\) and \(F_1=1\text{,}\) the Fibonacci sequence, is the function:
def F(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return F(n-1) + F(n-1)
Now given a sequence, what happens if you add these values together? The following notation will be familiar from calculus.
Definition4.1.11.Series.
Let \(\{a_n\}\) be a sequence. We define a series of the sequence to be the summation of some subset of the terms of the sequence. We denote the sum by a capital sigma with sub- and superscript information in the following conventional way:
\begin{equation*}
\sum_{\text{index variable, lower bound}}^{\text{upper bound}} \text{(sequence rule in terms of index variable)}
\end{equation*}
For example, the summation of terms from 0 to \(n\) is expressed:
Recurrence relations are like recursive functions. For example, you can find the \(n\)th Fibonacci number, \(F_n\text{,}\) by evaluating fibonacci(n)
The initial conditions of a a recurrence guarantee that it has a unique solution. These initial conditions are the terminal/base conditions for the recursive functions. Because it’s theoretical, math can go on forever, computers enter infinite loops:
Eventually, we’ll get RecursionError: maximum recursion depth exceeded while calling a Python object
ExercisesExercises
1.
Find the first five terms of the sequence \(\{a_n\}\text{,}\) beginning with \(n=0\text{:}\)
This one’s a lot of fun, so let’s do it in a lot of detail. This is approach Blaise Pascal used to discover the formula in his 1654 Traité du triangle arithmétique.
Let \(a_n = (n+1)^3\text{.}\) Then from Example 4.1.14, we have that:
We have from Example 4.1.15 that \(\displaystyle \sum_{j=1}^n j = \dfrac{n(n+1)}{2}\) and if we add \(1\) a total of \(n\) times, we have \(\displaystyle \sum_{j=1}^n 1 = n\text{.}\) Plugging these in, we find: