Skip to main content
Mathematics LibreTexts

8.2: Sequences

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Sequences and Ways They Are Defined

    Definition \(\PageIndex{1}\): Sequence

    A sequence is a function from the natural numbers into some predetermined set. The image of any natural number \(k\) can be written as \(S(k)\) or \(S_k\) and is called the \(k^{th}\) term of \(S\text{.}\) The variable \(k\) is called the index or argument of the sequence.

    For example, a sequence of integers would be a function \(S:\mathbb{N}\to \mathbb{Z}\text{.}\)

    Example \(\PageIndex{1}\): Three Sequences Defined in Different Ways

    1. The sequence \(A\) defined by \(A(k) = k^2 - k\text{,}\) \(k \geq 0\text{,}\) is a sequence of integers.
    2. The sequence \(B\) defined recursively by \(B(0) = 2\) and \(B(k) = B(k - 1) + 3\) for \(k \geq 1\) is a sequence of integers. The terms of \(B\) can be computed either by applying the recursion formula or by iteration. For example,
      \begin{equation*} \begin{split} B(3) &= B(2) + 3\\ & =(B(1)+3)+3\\ & = ((B(0)+3)+3)+3\\ &=((2+3)+3)+3=11 \end{split} \end{equation*}
      \begin{equation*} \begin{array}{c} B(1) = B(0) + 3 = 2 + 3 = 5\\ B(2) = B(1) + 3 = 5 + 3 = 8\\ B(3) = B(2) + 3 = 8 + 3 = 11 \end{array} \end{equation*}
    3. Let \(C_r\) be the number of strings of 0's and 1's of length \(r\) having no consecutive zeros. These terms define a sequence \(C\) of integers.


    1. A sequence is often called a discrete function.
    2. Although it is important to keep in mind that a sequence is a function, another useful way of visualizing a sequence is as a list. For example, the sequence \(A\) in the previous example could be written as \((0, 0, 2, 6, 12, 20, \dots )\text{.}\) Finite sequences can appear much the same way when they are the input to or output from a computer. The index of a sequence can be thought of as a time variable. Imagine the terms of a sequence flashing on a screen every second. Then \(s_k\) would be what you see in the \(k^{th}\) second. It is convenient to use terminology like this in describing sequences. For example, the terms that precede the \(k^{th}\) term of \(A\) would be \(A (0), A(1), . . . , A(k -1)\text{.}\) They might be called the earlier terms.

    Fundamental Problem

    Given the definition of any sequence, a fundamental problem that we will concern ourselves with is to devise a method for determining any specific term in a minimum amount of time. Generally, time can be equated with the number of operations needed. In counting operations, the application of a recursive formula would be considered an operation.

    1. The terms of \(A\) in Example \(\PageIndex{1}\) are very easy to compute because of the closed form expression. No matter what term you decide to compute, only three operations need to be performed.
    2. How to compute the terms of \(B\) is not so clear. Suppose that you wanted to know \(B(100)\text{.}\) One approach would be to apply the definition recursively:
      \begin{equation*} B(100) = B(99) + 3 = (B(98) + 3) + 3 =\cdots \end{equation*}
      The recursion equation for \(B\) would be applied 100 times and 100 additions would then follow. To compute \(B(k)\) by this method, \(2k\) operations are needed. An iterative computation of \(B(k)\) is an improvement: \(B(1) =B(0) +3 = 2 + 3 = 5\) \(B(2) =B(1)+3= 5 + 3 = 8\: \text{etc}.\) Only \(k\) additions are needed. This still isn't a good situation. As \(k\) gets large, we take more and more time to compute \(B(k)\text{.}\) The formula \(B(k)=B(k-1)+3\) is called a recurrence relation on \(B\text{.}\) The process of finding a closed form expression for \(B(k)\text{,}\) one that requires no more than some fixed number of operations, is called solving the recurrence relation.
    3. The determination of \(C_k\) is a standard kind of problem in combinatorics. One solution is by way of a recurrence relation. In fact, many problems in combinatorics are most easily solved by first searching for a recurrence relation and then solving it. The following observation will suggest the recurrence relation that we need to determine \(C_k\text{.}\) If \(k \geq 2\text{,}\) then every string of 0's and 1's with length \(k\) and no two consecutive 0's is either \(1s_{k-1}\) or \(01s_{k-2}\text{,}\) where \(s_{k-1}\) and \(s_{k-2}\) are strings with no two consecutive 0's of length \(k - 1\) and \(k - 2\) respectively. From this observation we can see that \(C_k= C_{k-2}+C_{k-1}\) for \(k\geq 2\text{.}\) The terms \(C_0= 1\) and \(C_1 = 2\) are easy to determine by enumeration. Now, by iteration, any \(C_k\) can be easily determined. For example, \(C_5 = 21\) can be computed with five additions. A closed form expression for \(C_k\) would be an improvement. Note that the recurrence relation for \(C_k\) is identical to the one for The Fibonacci Sequence, Example 8.1.3. Only the basis is different.


    Exercise \(\PageIndex{1}\)

    Prove by induction that \(B(k) = 3k + 2,\) \(k\geq 0\text{,}\) is a closed form expression for the sequence \(B\) in Example \(\PageIndex{1}\)


    Basis: \(B(0)=3\cdot 0+2=2\text{,}\) as defined.

    Induction: Assume: \(B(k)=3k+2\) for some \(k\geq 0\text{.}\)

    \begin{equation*} \begin{split} B(k+1) &=B(k)+3\\ &=(3k+2)+3\quad \textrm{ by the induction hypothesis} \\ &=(3k+3)+2\\ &=3(k+1)+2\quad \textrm{as desired} \end{split} \end{equation*}

    Exercise \(\PageIndex{2}\)

    1. Consider sequence \(Q\) defined by \(Q(k) = 2k + 9\text{,}\) \(k \geq 1\text{.}\) Complete the table below and determine a recurrence relation that describes \(Q\text{.}\)
      \(\begin{array}{c|c|c} k & Q(k) & Q(k)-Q(k-1) \\ \hline 2 & & \\ 3 & & \\ 4 & \text{ } & \\ 5 & & \\ 6 & & \\ 7 & & \\ \end{array}\)
    2. Let \(A(k) = k^2 - k\text{,}\) \(k \geq 0\text{.}\) Complete the table below and determine a recurrence relation for \(A\text{.}\)
      \begin{equation*} \begin{array}{c|c|c|c} k & A(k) & A(k)-A(k-1) & A(k)-2A(k-1)+A(k-2) \\ \hline 2 & & & \\ 3 & & & \\ 4 & & & \\ 5 & & & \\ \end{array} \end{equation*}

    Exercise \(\PageIndex{3}\)

    Given \(k\) lines (\(k\geq 0\)) on a plane such that no two lines are parallel and no three lines meet at the same point, let \(P(k)\) be the number of regions into which the lines divide the plane (including the infinite ones (see Figure \(\PageIndex{1}\)). Describe how the recurrence relation \(P(k) = P(k - 1) + k\) can be derived. Given that \(P(0) = 1\text{,}\) determine \(P(5)\text{.}\)


    Figure \(\PageIndex{1}\): A general configuration of three lines


    Imagine drawing line \(k\) in one of the infinite regions that it passes through. That infinite region is divided into two infinite regions by line \(k\text{.}\) As line \(k\) is drawn through every one of the \(k-1\) previous lines, you enter another region that line \(k\) divides. Therefore \(k\) regions are divided and the number of regions is increased by \(k\text{.}\) From this observation we get \(P(5)=16\text{.}\)

    Exercise \(\PageIndex{4}\)

    A sample of a radioactive substance is expected to decay by 0.15 percent each hour. If \(w_t,\) \(t \geq 0\text{,}\) is the weight of the sample \(t\) hours into an experiment, write a recurrence relation for \(w\text{.}\)

    Exercise \(\PageIndex{5}\)

    Let \(M(n)\) be the number of multiplications needed to evaluate an \(n^{th}\) degree polynomial. Use the recursive definition of a polynomial expression to define \(M\) recursively.


    For \(n\) greater than zero, \(M(n)=M(n-1)+1\text{,}\) and \(M(0)=0\text{.}\)

    Exercise \(\PageIndex{6}\)

    Let \(S\) be sequence of integers. Using short English sentences, not symbols, describe what the following propositions say about \(S\text{.}\) Are the two propositions equivalent?

    1. \(\displaystyle (\forall M)_{\mathbb{N}}((\exists n)_{\mathbb{N}}(S(n)\geq M))\)
    2. \(\displaystyle (\forall M)_{\mathbb{N}}((\exists N)_{\mathbb{N}}((\forall n)_{\mathbb{N}}(n \geq N \rightarrow S(n)\geq M)))\)

    This page titled 8.2: Sequences is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Al Doerr & Ken Levasseur via source content that was edited to the style and standards of the LibreTexts platform.