Skip to main content

Section 6.5 Explicitly-defined Sequences

We began our exploration of discrete mathematics by listing and counting objects. But what exactly is a β€œlist” when the list is infinite such as
\begin{equation*} 1,3,5,7,9,11,\ldots? \end{equation*}
In this section, we define such infinite lists (sequences) using functions, look at examples of evaluating sequences, and practice modeling with sequences.

Subsection 6.5.A The Definition of Sequence

We begin with a formal definition.

Definition 6.5.1 Sequence.

Β 
  1. A sequence is a function whose domain is a set of the form \(\{s,s+1,s+2,s+3,\ldots\}\) where \(s\) is an integer. Note that when \(s=0\) this set is \(\mathbb{N}\) and when \(s=1\) this set is \(\mathbb{Z}^+\text{.}\) For example, the function \(f: \mathbb{N} \to \mathbb{Q}\) defined by
    \begin{equation*} f(n) = \frac{n-1}{n+1} \end{equation*}
    is a sequence.
  2. A sequence starts at \(s\) if its domain is \(\{s,s+1,s+2,s+3,\ldots\}\text{.}\) For example, the sequence from (a) starts at 0 because the domain is \(\mathbb{N}\text{.}\) We primarily consider sequences that start at 0 or 1.
  3. As a shorthand, we use sequence notation to write \(a_n=f(n)\) for \(n \ge s\text{.}\) For example, the sequence from (a) can be defined by
    \begin{equation*} a_n = \frac{n-1}{n+1} \text{ for } n \ge 0\text{.} \end{equation*}
    This notation specifies the domain and rule for the function but not the codomain and so it should only be used when the codomain is clear from the context or stated separately.
  4. A sequence can be described using a list of its terms:
    \begin{equation*} a_s, a_{s+1}, a_{s+2}, \ldots\text{.} \end{equation*}
    For example, in the sequence from (a) we calculate
    \begin{align*} a_0 \amp = \frac{0-1}{0+1}=\frac{-1}{1}=-1\\ a_1 \amp = \frac{1-1}{1+1}=\frac{0}{2}=0\\ a_2 \amp = \frac{2-1}{2+1}=\frac{1}{3}\\ a_3 \amp = \frac{3-1}{3+1}=\frac{2}{4}=\frac{1}{2}\\ a_4 \amp = \frac{4-1}{4+1}=\frac{3}{5}\\ a_5 \amp = \frac{5-1}{5+1}=\frac{4}{6}=\frac{2}{3} \end{align*}
    and so the sequence corresponds to the list beginning
    \begin{equation*} -1, 0, \frac{1}{3}, \frac{1}{2}, \frac{3}{5}, \ldots\text{.} \end{equation*}
  5. We can list the first few terms of a sequence using a table, as in TableΒ 6.5.2.
    Table 6.5.2. Displaying a sequence in a table
    \(n\) \(s\) \(s+1\) \(s+2\) \(s+3\) \(s+4\) \(s+5\)
    \(a_n\) \(a_s\) \(a_{s+1}\) \(a_{s+2}\) \(a_{s+3}\) \(a_{s+4}\) \(a_{s+5}\)
    For example, we can list the first terms of \(a_n = \frac{n-1}{n+1}\) for \(n \ge 0\) in TableΒ 6.5.3.
    Table 6.5.3. The first few terms of the sequence \(a\) defined by \(a_n = \frac{n-1}{n+1}\) for \(n \ge 0\)
    \(n\) \(0\) \(1\) \(2\) \(3\) \(4\) \(5\)
    \(a_n\) \(-1\) \(0\) \(\frac{1}{3}\) \(\frac{1}{2}\) \(\frac{3}{5}\) \(\frac{2}{3}\)
  6. The expression \(a_n\) is pronounced β€œ\(a\) sub \(n\)”. The (input) value of \(n\) is the index of the term and the (output) value of \(a_n\) is the term of the sequence. For example, in the sequence from (a), the term \(a_3\) is \(\frac{1}{2}\) and its index is \(3\text{.}\)
  7. A sequence is explicitly-defined (or in closed form) if there is a rule for \(a_n\) that depends only on \(n\) and constants. For example, the sequence from (a) is explicitly-defined.
Let’s look at some examples of sequences.

Example 6.5.4 Evaluating explicitly-defined sequences.

For each sequence, evaluate the first four terms and evaluate the 100th term.
  1. The sequence \(a\) is defined by \(a_n= 2n\) for \(n \ge 0\text{.}\)
    Solution.
    We calculate \(a_0 = 2(0) = 0\text{,}\) \(a_1 = 2(1) = 1\text{,}\) \(a_2 = 2(2) = 4\text{,}\) and \(a_3 = 2(3) = 6\text{.}\) The first four terms are \(0, 2, 4, 6\text{.}\) To find \(a_{100}\) we calculate \(a_{100}= 2(100) = 200\text{.}\)
  2. The sequence \(b\) is defined by \(b_k = 2^k\) for \(k \ge 0\text{.}\)
    Solution.
    We calculate \(b_0 = 2^0 = 1\text{,}\) \(b_1 = 2^1 = 2\text{,}\) \(b_2 = 2^2 = 4\text{,}\) and \(b_3 = 2^3 = 8\text{.}\) The first four terms are \(1,2,4,8\text{.}\) To find \(b_{100}\) we calculate \(b_{100}= 2^{100}\text{.}\)
  3. The sequence \(c\) is defined by \(c_m = 10m!\) for \(m \ge 0\text{.}\)
    Solution.
    We calculate \(c_0 = 10\cdot0! = 10\cdot1= 10\text{,}\) \(c_1 = 10\cdot1! = 10\cdot1= 10\text{,}\) \(c_2 = 10\cdot2! = 10\cdot2= 20\text{,}\) and \(c_3 = 10\cdot3! = 10\cdot6= 60\text{.}\) The first four terms are \(10, 10, 20, 60\text{.}\) To find \(c_{100}\) we calculate \(c_{100}= 10\cdot(100!)\text{.}\)
  4. The sequence \(h\) is defined by \(h_n = \frac{n(n-1)}{2}\) for \(n \ge 1\text{.}\)
    Solution.
    We calculate \(h_1 = \frac{1(1-1)}{2}= \frac{0}{2} = 0\text{,}\) \(h_2 = \frac{2(2-1)}{2}= \frac{2}{2} = 1\text{,}\) \(h_3 = \frac{3(3-1)}{2}= \frac{6}{2} = 3\text{,}\) and \(h_4 = \frac{4(4-1)}{2}= \frac{12}{2} = 6\text{.}\) The first four terms are \(0,1,3,6\text{.}\) To find \(h_{100}\) we calculate \(h_{100}=\frac{100(100-1)}{2}= \frac{9900}{2} = 4950\text{.}\)
  5. The sequence \(t\) is defined by \(t_j=\frac{(-1)^j}{j^2}\) for \(j \ge 1\text{.}\)
    Solution.
    We calculate \(t_1 = \frac{(-1)^1}{1^2}=\frac{-1}{1}=-1\text{,}\) \(t_2 \frac{(-1)^2}{2^2}= \frac{1}{4}\text{,}\) \(t_3 \frac{(-1)^3}{3^2}= ^-\frac{1}{9}\text{,}\) and \(t_4 \frac{(-1)^4}{4^2} = \frac{1}{16}\text{.}\) The first four terms are \(-1, \frac{1}{4}, ^-\frac{1}{9}, \frac{1}{16}\text{.}\) To find \(t_{100}\) we calculate \(s_{100}=\frac{(-1)^{200}}{200^2} = \frac{1}{40000}\text{.}\)
  6. The sequence \(u\) is defined by \(u_m = m(2m-1)\) for \(m \ge 1\text{.}\)
    Solution.
    We calculate \(u_1 = 1(2(1)-1)=1(1)=1\text{,}\) \(u_2 = 2(2(2)-1)=2(3)=6\text{,}\) \(u_3 =3(2(3)-1)=3(5)=15\text{,}\) and \(u_4 =4(2(4)-1)=4(7)=28\text{.}\) The first four terms are \(1, 6, 15, 28\text{.}\) To find \(u_{100}\) we calculate \(u_{100}= 100(2(100)-1)=100(199)=19900\text{.}\)
  7. The sequence \(v\) is defined by \(v_i = \left\lfloor \frac{i}{2} \right \rfloor\) for \(i \ge 0\text{.}\)
    Solution.
    We calculate \(v_0 = \left\lfloor \frac{0}{2} \right \rfloor = \left\lfloor 0 \right \rfloor= 0\text{,}\) \(v_1 = \left\lfloor \frac{1}{2} \right \rfloor = \left\lfloor 0.5 \right \rfloor= 0\text{,}\) \(v_2 = \left\lfloor \frac{2}{2} \right \rfloor = \left\lfloor 1 \right \rfloor= 1\text{,}\) and \(v_3 = \left\lfloor \frac{3}{2} \right \rfloor = \left\lfloor 1.5 \right \rfloor= 1\text{,}\) . The first four terms are \(0, 0, 1, 1\text{.}\) To find \(v_{100}\) we calculate \(v_{100}= \left\lfloor \frac{100}{2} \right \rfloor = \left\lfloor 50 \right \rfloor= 50\text{.}\)
Like any function, a sequence can have a rule defined in words and can involve discrete objects.

Example 6.5.5 Evaluating sequences with rules defined in words.

For each sequence, evaluate the first seven terms.
  1. The sequence \(d\) is defined by \(d_k =\) the number of digits in \(2^k\) for \(k \ge 1\text{.}\)
    Solution.
    First, \(d_1\) is the number of digits in \(2^1=2\) and so \(d_1=1\text{.}\)
    Next, \(d_2\) is the number of digits in \(2^2=4\) and so \(d_2=1\text{.}\)
    Then, \(d_3\) is the number of digits in \(2^3=8\) and so, once again, \(d_3=1\text{.}\)
    Next, \(d_4\) is the number of digits in \(2^4=16\) and so \(d_4=2\text{.}\)
    Then, \(d_5\) is the number of digits in \(2^5=32\) and so \(d_5=2\text{.}\)
    Next, \(d_6\) is the number of digits in \(2^6=64\) and so \(d_6 = 2\) yet again.
    Last, \(d_7\) is the number of digits in \(2^7=128\) and so \(b_7=3\text{.}\)
    The first seven terms are \(1,1,1,2,2,2,3\text{.}\)
  2. The sequence \(p\) is defined by
    \begin{equation*} p_m = \left\{ \begin{array}{cl} \frac{m}{2} \amp \text{ if } m \text{ is even } \\ 2m \amp \text{ if } m \text{ is odd } \end{array} \right.\text{.} \end{equation*}
    for \(m \ge 0\text{.}\)
    Solution.
    First, 0 is even and so \(p_0 = \frac{0}{2} = 0\text{.}\)
    Next, 1 is odd and so \(p_1=2(1) = 2\text{.}\)
    Then, 2 is even and so \(p_2=\frac{2}{2}=1\text{.}\)
    Next, 3 is odd and so \(p_3=2(3) = 6\text{.}\)
    Then, 4 is even and so \(p_4=\frac{4}{2}=2\text{.}\)
    Next, 5 is odd and so \(p_5=2(5) = 10\text{.}\)
    Last, 6 is even and so \(p_6=\frac{6}{2}=3\text{.}\)
    The first seven terms are \(0, 2, 1, 6, 2, 10, 3\text{.}\)
  3. The sequence \(s\) is defined by \(s_j=\{0,1,2,\ldots,j-1\}\) for \(j \ge 1\text{.}\)
    Solution.
    First, when \(j=1\) the set goes from 0 to \(j-1=0\) and so \(s_1=\{0\}\text{.}\) The … notation can be a bit misleading here, just think of \(s_j\) as the set of consecutive integers starting at 0 and ending at \(j-1\text{.}\)
    Next, when \(j=2\) the set goes from 0 to \(j-1=1\) and so \(s_2=\{0,1\}\text{.}\)
    Then \(s_3=\{0,1,2\}\text{,}\) \(s_4=\{0,1,2,3\}\text{,}\) \(s_5=\{0,1,2,3,4\}\text{,}\) and \(s_6=\{0,1,2,3,4,5\}\text{.}\)
    The first four terms are \(\{0\},\{0,1\},\{0,1,2\},\{0,1,2,3\}, \{0,1,2,3,4\}, \{0,1,2,3,4,5\}\text{.}\)
Try working with sequences.

Activity 6.5.A Evaluating explicitly-defined sequences.

For each sequence, evaluate the first five terms and the term with index \(20\text{.}\)
  1. The sequence \(a\) is defined by \(a_n=10n + 2\) for \(n \ge 0\text{.}\)
  2. The sequence \(b\) is defined by \(b_i = 2(10^i)\) for \(i \ge 0\text{.}\)
  3. The sequence \(c\) is defined by \(c_n = \frac{(-1)^nn}{n^2+1}\) for \(n \ge 1\text{.}\)
  4. The sequence \(y\) is defined by \(y_n\) is the set of positive divisors of \(n\) for \(n \ge 1\text{.}\)
  5. The sequence \(z\) is defined by \(z_m=\) the bit string of length \(m\) consisting of all \(\bs{1}\) s for \(m \ge 1\text{.}\)

Subsection 6.5.B Modeling with Explicitly-defined Sequences

In the examples we have seen so far, we have gone from a sequence defined by a rule to a list or table. It is particularly useful to go the opposite direction, from the list or table to a rule. Let’s try modeling with sequences.

Activity 6.5.B Modeling with explicitly-defined sequences.

Write a simple explicit rule that generates each sequence. It might help to write the terms in a table. Make sure you say where the index starts. There are hints at the end.
  1. The sequence \(a\) begins \(4,4,4,4,4,4,4,4,\ldots\text{.}\)
  2. The sequence \(b\) begins \(5,-5,5,-5,5,-5,5,-5,\ldots\text{.}\)
  3. The sequence \(c\) begins \(5, 7, 9, 11, 13,\ldots\text{.}\)
  4. The sequence \(d\) begins \(2, -3, 4, -5, 6, -7,\ldots\text{.}\)
  5. The sequence \(e\) begins \(5,10,20,40,80, \ldots\text{.}\)
  6. The sequence \(f\) begins \(11, 101, 1001, 10001, 100001, \ldots\text{.}\)
  7. The sequence \(g\) begins \(0, \frac{1}{2}, \frac{2}{3}, \frac{3}{4}, \frac{4}{5}, \ldots\text{.}\)
  8. The sequence \(s\) begins \(\frac{2}{3}, 1, \frac{6}{5}, \frac{4}{3}, \frac{10}{7}, \frac{3}{2}, \frac{14}{9}, \ldots\text{.}\)
  9. The sequence \(t\) begins \(5, 10, 30, 120, 600, \ldots\text{.}\)
  10. The sequence \(u\) begins \(5, 6, 8, 11, 15, 20, \ldots\text{.}\)
  11. The sequence \(v\) begins \(3, 10, 21, 36, 55, \ldots\text{.}\)
  12. The sequence \(w\) begins \(1,1,1,2,2,2,3,3,3,4,4,4, \ldots\text{.}\)
  13. The sequence \(x\) begins \(2, 3, 6, 12, 18, 27, \ldots\text{.}\)
Check.
  1. Start the index at 0.
  2. Start the index at 0. Use \((-1)^n\) to get the alternation.
  3. Start the index at 0. We add two to get from each term to the next, so the answer likely involves \(2+2+\ldots +2 = 2n\text{.}\) Make a table comparing \(n\text{,}\) \(2n\text{,}\) and the terms of the sequence.
  4. Start the index at 0 or 1 (your choice).
  5. Start the index at 0. We multiply by two to get from each term to the next, so the answer likely involves \(2\times 2 \times \ldots \times 2 = 2^n\text{.}\) Make a table comparing \(n\text{,}\) \(2^n\text{,}\) and the terms of the sequence.
  6. Start the index at 0 or 1 (your choice).
  7. Find a formula for the numerator sequence (\(0,1,2,3,4,\ldots\)) and then find a different formula for the denominator sequence (\(1,2,3,4,5,\ldots\)). Note: Start the index at 0 or 1 (your choice), but the numerator and denominator need to start at the same index.
  8. The fractions were likely reduced, so consider rewriting as equivalent fractions over more convenient denominators. Note: Start the index at 0 or 1 (your choice).
  9. Start the index at 1. To get from each term to the next we multiply by 2, then multiply by 3, then by multiply by 4, then multiply by 5, so the answer likely involves \(1 \times 2 \times 3 \times \cdots \times n = n!\text{.}\) Make a table comparing \(n\text{,}\) \(n!\text{,}\) and the terms of the sequence.
  10. Start the index at 1. To get from each term to the next we add 1, then add 2, then we add 3, then we add 4, then we add 5, so the answer likely involves \(1+2+3+ \ldots n-1=\frac{n(n-1)}{2}\) or \(1+2+3+ \ldots n = \frac{n(n+1)}{2}\text{,}\) which we first saw in the Handshakes Puzzle ActivityΒ 1.1.A. Make a table comparing \(n\text{,}\) \(\frac{n(n-1)}{2}\text{,}\) and the terms of the sequence.
  11. Start the index at 1. Make a table comparing \(n\) and the terms of the sequence. Factor out \(n\text{.}\)
  12. The terms repeat so likely either floor or ceiling is involved. Note: Start the index at 0 or 1 (your choice).
  13. The sequence \(x\) begins \(2, 3, 6, 12, 18, 27, \ldots\text{.}\) Start the index at 1. Make a table showing the index \(n\text{,}\) \(n^2\text{,}\) and the terms.
Let’s look at some examples similar to the sequences in ActivityΒ 6.5.B.

Example 6.5.8 Modeling with explicitly-defined sequences.

Write a simple explicit rule that generates each sequence.
  1. The sequence \(a\) begins \(1, \frac{1}{2}, \frac{1}{3},\frac{1}{4},\frac{1}{5},\ldots\text{.}\)
    Solution.
    Let’s make a table comparing \(n\text{,}\) the numerator sequence, and the denominator sequence, in TableΒ 6.5.9. Notice that the numerator is the constant 1 and the denominator equals the index \(n\) if we start at \(n=1\text{.}\) A possible formula is \(a_n = \frac{1}{n}\) for \(n \ge 1\text{.}\)
    Table 6.5.9. The sequence from ExampleΒ 6.5.8 (a)
    \(n\) 1 2 3 4 5
    numerator 1 1 1 1 1
    denominator 1 2 3 4 5
    \(a_n\) 1 \(\frac{1}{2}\) \(\frac{1}{3}\) \(\frac{1}{4}\) \(\frac{1}{5}\)
  2. The sequence \(b\) begins \(5,8,11,14,17,20,\ldots\text{.}\)
    Solution.
    We add three to get from each term to the next, so the answer likely involves \(3+3+\ldots +3 = 3n\text{.}\) Let’s make a table comparing \(n\text{,}\) \(3n\text{,}\) and the terms of the sequence starting at \(n=0\text{,}\) in TableΒ 6.5.10. Notice that we can get from \(3n\) to \(b_n\) by adding five. A possible formula is \(b_n = 3n+5\) for \(n \ge 0\text{.}\)
    Table 6.5.10. The sequence from ExampleΒ 6.5.8 (b)
    \(n\) 0 1 2 3 4 5
    \(3n\) 0 3 6 9 12 15
    \(b_n\) 5 8 11 14 17 20
    \(=0+5\) \(=3+5\) \(=6+5\) \(=9+5\) \(=12+5\) \(=15+5\)
  3. The sequence \(c\) begins \(2, -3, 4, -5, 6, -7,\ldots\text{.}\)
    Solution.
    We can use \((-1)^n\) to get the alternation, so let’s make a table comparing \(n\text{,}\) \((-1)^n\text{,}\) and the absolute value of the terms of the sequence starting at \(n=0\text{,}\) in TableΒ 6.5.11. Notice that the absolute value of the terms of the sequence are two more than the index \(n\text{.}\) A possible formula is \(c_n = (-1)^n(n+2)\) for \(n \ge 0\text{.}\)
    Table 6.5.11. The sequence from ExampleΒ 6.5.8 (c)
    \(n\) 0 1 2 3 4 5
    \((-1)^n\) 1 -1 1 -1 1 -1
    \(|c_n|\) 2 3 4 5 6 7
    \(c_n\) 2 -3 4 -5 6 -7
    \(=1(0+2)\) \(=-1(1+2)\) \(=1(2+2)\) \(=-1(3+2)\) \(=1(4+2)\) \(=-1(5+2)\)
  4. The sequence \(d\) begins \(\frac{2}{3}, \frac{4}{7}, \frac{6}{11}, \frac{8}{15}, \ldots\text{.}\)
    Solution.
    Let’s make a table comparing \(n\text{,}\) the numerator sequence, the denominator sequence, and the terms of the sequence starting at \(n=1\) in TableΒ 6.5.12. Notice the numerator is twice the index so it equals \(2n\text{.}\) For the denominator, we add four to get from each term to the next, so the answer likely involves \(4+4+\ldots +4 = 4n\text{.}\) Let’s add a row for \(4n\) to our table. We can get from \(4n\) to the denominator by subtracting one. A possible formula is \(d_n = \frac{2n}{4n-1}\) for \(n \ge 1\text{.}\)
    Table 6.5.12. The sequence from ExampleΒ 6.5.8 (d)
    \(n\) 1 2 3 4
    \(2n\) 2 4 6 8
    numerator 2 4 6 8
    \(4n\) 4 8 12 16
    denominator 3 7 11 15
    \(=4-1\) \(=8-1\) \(=12-1\) \(=16-1\)
    \(d_n\) \(\frac{2}{3}\) \(\frac{4}{7}\) \(\frac{6}{11}\) \(\frac{8}{15}\)
  5. The sequence \(e\) begins \(2,20,200,2000,20000, \ldots\text{.}\)
    Solution.
    We multiply by 10 to get from each term to the next, so the answer likely involves \(10 \times 10 \times \ldots \times 10 = 10^n\text{.}\) Let’s make a table comparing \(n\text{,}\) \(10^n\text{,}\) and the terms of the sequence starting at \(n=0\text{,}\) in TableΒ 6.5.13. We can get from \(10^n\) to the terms by multiplying by two. A possible formula is \(e_n = 2(10^n)\) for \(n \ge 0\text{.}\)
    Table 6.5.13. The sequence from ExampleΒ 6.5.8 (e)
    \(n\) 0 1 2 3 4
    \(10^n\) 1 10 100 1000 10000
    \(e_n\) 2 20 200 2000 20000
    \(= 2(1)\) \(= 2(10)\) \(= 2(100)\) \(= 2(1000)\) \(= 2(10000)\)
  6. The sequence \(f\) begins \(2, 3, 5, 9, 17, \ldots\text{.}\)
    Solution.
    To get from each term to the next we add two, then add four, then add eight, and then add 16 so perhaps the pattern involves powers of two again. Let’s make a table comparing \(n\text{,}\) \(2^n\text{,}\) and the terms of the sequence starting at \(n=0\text{,}\) in TableΒ 6.5.14. We can get from \(2^n\) to the terms by adding one. A possible formula is \(f_n = 2^n+1\) for \(n \ge 0\text{.}\)
    Table 6.5.14. The sequence from ExampleΒ 6.5.8 (f)
    \(n\) 0 1 2 3 4
    \(2^n\) 1 2 4 8 16
    \(f_n\) 2 3 5 9 17
    \(=1+1\) \(=2+1\) \(=4+1\) \(=8+1\) \(=16+1\)
  7. The sequence \(s\) begins \(1, 3, 7, 15, 31, \ldots\text{.}\)
    Solution.
    To get from each term to the next we add one, add two, then add four, then add eight, so perhaps the pattern involves powers of two. Let’s make a table comparing \(n\text{,}\) \(2^n\text{,}\) and the terms of the sequence starting at \(n=0\text{,}\) in TableΒ 6.5.15. The powers of two and the terms differ by one, but they are not aligned. Let’s write each term using powers of two. We see the power of two is one larger than the index, so the pattern involves \(2^{n+1}\text{.}\) A possible formula is \(s_n = 2^{n+1}-1\) for \(n \ge 0\text{.}\)
    Table 6.5.15. The sequence from ExampleΒ 6.5.8 (g)
    \(n\) 0 1 2 3 4
    \(2^n\) 1 2 4 8 16
    \(f_n\) 1 3 7 15 31
    \(=2-1\) \(=4-1\) \(=8-1\) \(=16-1\) \(=32-1\)
    \(=2^1-1\) \(=2^2-1\) \(=2^3-1\) \(=2^4-1\) \(=2^5-1\)
  8. The sequence \(t\) begins \(4, 5, 9, 27, 123, 603, \ldots\text{.}\)
    Solution.
    The terms are growing large quickly. Let’s look at their ratios \(\frac{5}{4} = 1.25\text{,}\) \(\frac{9}{5} = 1.8\text{,}\) \(\frac{27}{9}=3\text{,}\) \(\frac{123}{27} = 4.55.\text{..,}\) \(\frac{603}{123} = 4.90.\text{...}\) It’s almost like we are multiplying by one, then multiplying by two, then by three, then by four, then by five. That pattern would involve \(1 \times 2 \times \cdots \times n =n!\) Let’s make a table comparing \(n\text{,}\) \(n!\text{,}\) and the terms of the sequence starting at \(n=1\text{,}\) in TableΒ 6.5.16. A possible formula is \(t_n = n!+3\) for \(n \ge 1\text{.}\)
    Table 6.5.16. The sequence from ExampleΒ 6.5.8 (h)
    \(n\) 1 2 3 4 5 6
    \(n!\) 1 2 6 24 120 600
    \(t_n\) 4 5 9 27 123 603
    \(=1+3\) \(=2+3\) \(=6+3\) \(=24+3\) \(=120+3\) \(=600+3\)
  9. The sequence \(u\) begins \(3, 9, 18, 30, 45, 63, \ldots\text{.}\)
    Solution.
    Since all the terms are multiples of three, let’s start by factoring out three from each term to get \(1, 3, 6, 10, 15, 21, \ldots\text{.}\) To get from each term to the next we add one, add two, then add three, then add four, so the answer likely involves \(1+2+3+ \ldots n-1=\frac{n(n-1)}{2}\) or \(1+2+3+ \ldots n = \frac{n(n+1)}{2}\text{,}\) which we first saw in the Handshakes Puzzle ActivityΒ 1.1.A. Let’s make a table comparing \(n\text{,}\) \(\frac{n(n-1)}{2}\text{,}\) and the terms of the sequence starting at \(n=1\text{,}\) in TableΒ 6.5.17. Notice that we can get from the handshake numbers to the terms by multiplying by three. A possible formula is \(u_n = 3\frac{n(n-1)}{2}\) for \(n \ge 1\text{.}\)
    Table 6.5.17. The sequence from ExampleΒ 6.5.8 (i)
    \(n\) 1 2 3 4 5 6
    \(\frac{n(n-1)}{2}\) 1 3 6 10 15 21
    \(u_n\) 3 9 18 30 45 63
    \(=3(1)\) \(=3(3)\) \(=3(6)\) \(=3(10)\) \(=3(15)\) \(=3(21)\)
  10. The sequence \(v\) begins \(1, 6, 15, 28, 45, \ldots\text{.}\) Hint: Factor.
    Solution.
    Let’s make a table comparing \(n\) and the terms of the sequence starting at \(n=1\) in factored form, in TableΒ 6.5.18. Notice that \(v_n\) is the product of \(n\) and the odds. A possible formula is \(v_n = n(2n+1)\) for \(n \ge 1\text{.}\)
    Table 6.5.18. The sequence from ExampleΒ 6.5.8 (j)
    \(n\) 1 2 3 4 5
    \(v_n\) 1 6 15 28 45
    \(=1(1)\) \(=2(3)\) \(=3(5)\) \(=4(7)\) \(=5(9)\)
  11. The sequence \(w\) begins \(1,1,2,2,3,3,4,4, \ldots\text{.}\)
    Solution.
    Notice that the terms repeat, so floor or ceiling is likely involved. Since each term repeats twice, let’s try \(\frac{n}{2}\text{.}\) Let’s make a table comparing \(n\text{,}\) \(\frac{n}{2}\text{,}\) and the terms of the sequence starting at \(n=1\text{,}\) in TableΒ 6.5.19. Notice that the ceiling function works. A possible formula is \(w_n = \lceil \frac{n}{2} \rceil\) for \(n \ge 1\text{.}\)
    Table 6.5.19. The sequence from ExampleΒ 6.5.8 (k)
    \(n\) 1 2 3 4 5 6 7 8
    \(\frac{n}{2}\) 0.5 1 1.5 2 2.5 3 3.5 4
    \(w_n\) 1 1 2 2 3 3 4 4
    \(=\lceil 0.5 \rceil\) \(=\lceil 1 \rceil\) \(=\lceil 1.5 \rceil\) \(=\lceil 2 \rceil\) \(=\lceil 2.5 \rceil\) \(=\lceil 3 \rceil\) \(=\lceil 3.5 \rceil\) \(=\lceil 4 \rceil\)
  12. The sequence \(x\) begins \(0, 3, 8, 15, 24, 35, \ldots\text{.}\)
    Solution.
    Let’s make a table comparing \(n\) and the terms of the sequence starting at \(n=1\) in factored form, in TableΒ 6.5.20. Notice the first term in the product is one less than \(n\) and the second term in the product is one more than \(n\text{.}\) (We could have factored 0 in many ways, but writing \(0 = 0(2)\) continues the pattern.) A possible formula is \(x_n = (n-1)(n+1)\) for \(n \ge 0\text{.}\)
    Note that \((n+1)(n-1) = n^2-1\) and so there is a quicker way to have found this pattern, provided we thought to compare the terms to \(n^2\) instead, as in TableΒ 6.5.21.
    Table 6.5.20. The sequence from ExampleΒ 6.5.8 (l)
    \(n\) 1 2 3 4 5 6
    \(x_n\) 0 3 8 15 24 35
    \(=0(2)\) \(=1(3)\) \(=2(4)\) \(=3(5)\) \(=4(6)\) \(=5(7)\)
    Table 6.5.21. The sequence from ExampleΒ 6.5.8 (l) revisited
    \(n\) 1 2 3 4 5 6
    \(n^2\) 1 4 9 16 25 36
    \(x_n\) 0 3 8 15 24 35
    \(1-1\) \(4-1\) \(9-1\) \(16-1\) \(25-1\) \(36-1\)

Subsection 6.5.C Detour: Sequences Involving Primes

The rule for a sequence can depend on prime factorization or the sequence of primes. Let’s look at a few examples involving prime factorization.

Example 6.5.22 Sequences involving prime factorization.

Β 
  1. Evaluate the first fifteen terms of the sequence defined by \(a_k =\) the number of distinct odd primes dividing \(k\) for \(k \ge 1\text{.}\)
    Solution.
    TableΒ 6.5.23 shows the odd prime divisors and the value of \(a_k\) of each integer \(k = 1,2, 3, \ldots 15\text{.}\) The first fifteen terms are
    \begin{equation*} 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2 \end{equation*}
    Table 6.5.23. The sequence from ExampleΒ 6.5.22 (a)
    \(k\) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    odd prime divisors none none 3 none 5 3 7 none 3 5 11 3 13 7 3, 5
    \(a_k=\) 0 0 1 0 1 1 1 0 1 1 1 1 1 1 2
  2. What is the first term of the sequence defined in (a) that equals three?
    Solution.
    We are looking for the smallest integer that is divisible by three distinct odd primes. Those primes must be 3, 5, and 7. The smallest integer divisible by 3, 5, and 7 is \(3 \cdot 5 \cdot 7 = 105\text{.}\)
  3. Evaluate the first ten terms of the sequence defined by
    \begin{equation*} s_m= \left\{ \begin{array}{cc} 1 \amp \text{ if } m=1 \\ m \amp \text{ if } m \text{ is prime } \\ 0 \amp \text{ if } m \text{ is composite } \end{array} \right.\text{.} \end{equation*}
    Solution.
    Notice that \(s_1=1\text{.}\) When \(m\) is prime we have \(s_m=m\) and so \(s_2=2\text{,}\) \(s_3=3\text{,}\) \(s_5 = 5\text{,}\) and \(s_7=7\text{.}\) When \(m\) is composite we have \(s_m=0\) and so \(s_4=0\text{,}\) \(s_6=0\text{,}\) \(s_8=0\text{,}\) \(s_9=0\text{,}\) and \(s_{10}=0\text{.}\) The first ten terms are
    \begin{equation*} 1, 2, 3, 0, 5, 0, 7, 0, 0, 0\text{.} \end{equation*}
  4. Write a simple explicit rule in words that generates the sequence
    \begin{equation*} 1, 1, 3, 1, 5, 3, 7, 1, 3, 5, 11, 3, 13, 7, 3, 1, 17, 3, 19, 5, 3 \ldots \end{equation*}
    Start the index at 1. Hint: the rule involves the prime factorization of the index.
    Solution.
    It can be helpful to look at the terms listed with their index as in TableΒ 6.5.24. Notice that the terms of the sequence \(a_n\) are either 1 or an odd prime. The terms equal to 1 are \(a_1\text{,}\) \(a_2\text{,}\) \(a_4\text{,}\) \(a_8\text{,}\) and \(a_{16}\text{,}\) namely where the index is a power of 2, which no odd prime divides. The terms equal to 3 are \(a_3\text{,}\) \(a_6\text{,}\) \(a_9\text{,}\) \(a_{12}\text{,}\) and \(a_{15}\text{,}\) namely where the index is multiple of 3. The terms equal to 5 are \(a_5\text{,}\) \(a_{10}\text{,}\) and \(a_{20}\) where the index is a multiple of 5, although \(a_{15} \neq 5\text{.}\) The terms equal to 7 are \(a_7\) and \(a_{14}\) where the index is a multiple of 7, although \(a_{21} \neq 7\text{.}\) In each case, the term is an odd prime dividing the index. The last clues are the exceptions \(a_{15}=3\) even though 15 is divisible by both 3 and 5 and \(a_{21}=3\) even though 21 is divisible by both 3 and 7. My guess is that
    \begin{equation*} a_n= \left\{ \begin{array}{cc} 1 \amp \text{ if } n \text{ is a power of 2 } \\ \text{ the smallest odd prime divisor of } n \amp \text{ otherwise } \end{array} \right.\text{.} \end{equation*}
    We use the phrase otherwise to indicate any cases not covered earlier. In this example, those cases are when \(n\) is not a power of 2.
    Table 6.5.24. The sequence from ExampleΒ 6.5.22 (d)
    \(n\) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    \(a_n\) 1 1 3 1 5 3 7 1 3 5 11 3 13 7 3 1 17 3 19 5 3
The rule for a sequence can involve the primes themselves. We give a name to the sequence of primes.

Definition 6.5.25 Sequence of primes.

The sequence of primes, denoted \(\pi_n\text{,}\) for \(n \ge 1\) is defined by
\begin{equation*} \pi_n= \text{ the } n^{\text{ th } } \text{ prime } = 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 \ldots\text{.} \end{equation*}
TableΒ 6.5.26 lists the first ten terms of this sequence. For example, the first prime is \(\pi_1=2\) and the seventh prime is \(\pi_7=17\text{.}\)
Table 6.5.26. The first ten terms of the sequence of primes from DefinitionΒ 6.5.25
\(n\) 1 2 3 4 5 6 7 8 9 10
\(\pi_n\) 2 3 5 7 11 13 17 19 23 29
Here is an example of a sequences that involve the sequence of primes

Example 6.5.27 Sequences involving \(\pi_n\).

Β 
  1. Evaluate the first five terms of the sequence defined by \(w_i=\pi_i^2 + \pi_i\) for \(i \ge 1\text{.}\)
    Solution.
    We calculate
    \begin{equation*} w_1 = \pi_1^2 + \pi_1 = 2^2 + 2 = 6\text{,} \end{equation*}
    \begin{equation*} w_2 = \pi_2^2 + \pi_2 = 3^2 + 3 = 12\text{,} \end{equation*}
    \begin{equation*} w_3 = \pi_3^2 + \pi_3 = 5^2 + 5 = 30\text{,} \end{equation*}
    \begin{equation*} w_4 = \pi_4^2 + \pi_4 = 7^2 + 7 = 56\text{,} \end{equation*}
    and
    \begin{equation*} w_5 = \pi_5^2 + \pi_5 = 11^2 + 11 = 132\text{.} \end{equation*}
  2. Write a simple explicit rule in words that generates the sequence
    \begin{equation*} 5, 8, 12, 18, 24, 30,\ldots \end{equation*}
    Start the index at 1. Hint: the rule involves the sequence of primes \(\pi_n\text{.}\)
    Solution.
    It is helpful to look at the prime sequence in TableΒ 6.5.26. Notice that our sequence \(b_n\) has
    \begin{equation*} b_1 =\pi_1+\pi_2=2+3=5\text{,} \end{equation*}
    \begin{equation*} b_2=\pi_2+\pi_3=3+5=8\text{,} \end{equation*}
    \begin{equation*} b_3=\pi_3+\pi_4=5+7=12\text{,} \end{equation*}
    \begin{equation*} b_4=\pi_4+\pi_5=7+11=18\text{,} \end{equation*}
    \begin{equation*} b_5=\pi_5+\pi_6=11+13=24\text{,} \end{equation*}
    and
    \begin{equation*} b_6=\pi_6+\pi_7=13+17=30\text{.} \end{equation*}
    In general,
    \begin{equation*} b_n=\pi_n + \pi_{n+1} \end{equation*}
    This pattern is not easy to notice and a hint might have helped. Since all but the first term is even, we might have tried dividing the terms by 2 to get
    \begin{equation*} 2.5, 4, 6, 9, 12, 15, \ldots \end{equation*}
    One might (or might not) then have noticed that these numbers are in between consecutive primes and, in fact, the average of consecutive primes.
It is your turn to work with sequences involving prime factorization or primes.

Activity 6.5.C Sequences involving prime factorization or primes.

Β 
  1. Evaluate the first twenty terms of the sequence defined by \(a_n=\) the largest prime divisor of \(n\) for \(n \ge 2\text{.}\) Also evaluate \(a_{100}\text{.}\)
  2. Evaluate the first ten terms of the sequence defined by \(b_k=\) the highest power of 3 dividing \(k\) for \(k \ge 1\text{.}\)
  3. What is the first term of the sequence defined in (b) that is greater than 10?
  4. Evaluate the first ten terms of the sequence defined by
    \begin{equation*} s_m= \left\{ \begin{array}{cc} m \amp \text{ if } m=1 \text{ or if } m \text{ is composite } \\ 0 \amp \text{ if } m \text{ is prime } \end{array} \right.\text{.} \end{equation*}
    Also evaluate \(s_{100}\text{.}\)
  5. Evaluate the first ten terms of the sequence defined by \(b_n= \pi_n+1\) for \(n \ge 1\text{.}\)
  6. Write a simple explicit rule in words that generates the sequence
    \begin{equation*} 0,1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2,\ldots \end{equation*}
    Start the index at 1. Hints: make a table as in ExampleΒ 6.5.22 showing the index for each term. The rule involves the prime factorization of the index. The first term greater than 2 is \(a_{30}=3\text{.}\)
  7. Write a simple explicit rule of the form
    \begin{equation*} a_n = \left\{ \begin{array}{ll} \underline{\hspace{.5in}} \amp \text{ if } n=1 \\ \underline{\hspace{.5in}} \amp \text{ if } n \text{ is prime } \\ \underline{\hspace{.5in}} \amp \text{ if } n \text{ is composite } \end{array} \right.\text{.} \end{equation*}
    that generates the sequence
    \begin{equation*} 0, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1,,\ldots\text{.} \end{equation*}
    Start the index at 1. Hint: make a table as in ExampleΒ 6.5.22 showing the index for each term.
  8. Write a simple explicit rule in words that generates the sequence
    \begin{equation*} 4,6,10,14,22,26,34,38,46,\ldots \end{equation*}
    Start the index at 1. Hints: the rule involves the sequence of primes \(\pi_n\text{.}\) Make a table showing the index \(n\) and the value of \(\pi_n\) for each term.

Subsection 6.5.D Exercises

Subsubsection Exercises for 6.5.A The Definition of Sequence

1. Practice.

Evaluate the first six terms of each sequence.
  1. \(a_n = 2^n +1\) for \(n \ge 0\text{.}\)
  2. \(b_k = 2k+5\) for \(k \ge 0\text{.}\)
  3. \(c_m= 5\left(\frac{1}{2} \right)^m\) for \(m \ge 1\text{.}\)
  4. \(d_i= 5\) for \(i \ge 1\text{.}\)
Check.
  1. Hint: It begins \(2, 3, 5\text{.}\)
  2. Hint: It begins \(5, 7, 9\text{.}\)
  3. Hint: \(c_6=\frac{5}{64}\text{.}\)
  4. Hint: \(d_6=5\text{.}\)

3. Understand.

Evaluate the first six terms of each sequence.
  1. \(r_n = \left\{ \begin{array}{cl} 0 \amp \text{ if } n\text{ is even } \\ 1 \amp \text{ if } n \text{ is odd } \end{array} \right.\) for \(n \ge 0 \text{.}\)
  2. \(s_n = \left\{ \begin{array}{cl} 0 \amp \text{ if } n \text{ is even } \\ n \amp \text{ if } n \text{ is odd } \end{array} \right.\) for \(n \ge 0 \text{.}\)
  3. \(t_n = \left\{ \begin{array}{cl} 0 \amp \text{ if } 3 \mid n \\ -1 \amp \text{ if } 3 \mid n-1 \\ 1 \amp \text{ if } 3 \mid n+1 \end{array} \right.\) for \(n \ge 0\text{.}\)
Check.
  1. Hint: It begins \(0,1,0\text{.}\)
  2. Hint: It is not the same as (a).
  3. Hint: It begins \(0,1,-1\text{.}\)

4. Understand.

Evaluate the first four terms and the 12th term of each sequence.
  1. \(a_m=\) the last digit of \(3m\) for \(m \ge 1\text{.}\)
  2. \(b_i=\) the number of digits in \(i^2\) for \(i \ge 1\text{.}\)
  3. \(c_n =\) the number \(4n\) written with its digits in reverse order for \(n \ge 1\text{.}\)
Check.
  1. Hint: \(a_{12} = 6\text{.}\)
  2. Hint: \(b_{12} = 3\text{.}\)
  3. Hint: \(c_{12} = 84\text{.}\)

6. Understand.

Evaluate the first five terms of each sequence. Hint: If something is impossible then the number of ways to do it equals zero.
  1. \(a_n =\) the number of ways to select two people to work on a project out of a group of \(n\) people for \(n \ge 1\text{.}\)
  2. \(b_n=\) the number of ways to select a leader and reporter out of group of \(n\) people for \(n \ge 1\text{.}\)
  3. \(c_n=\) the number of bit strings of length \(n\) for \(n \ge 0\text{.}\)
  4. \(d_n=\) the number of bit strings of length \(n\) that contain exactly three \(0s\) for \(n \ge 1\text{.}\)

7. Understand.

Evaluate the first four terms of each sequence.
  1. \(a_k =\) the bit string consisting of \(k\) 1s followed by two 0s for \(k \ge 0\text{.}\)
  2. \(S_m = \{ 0, 1, 2, \ldots, 2m\}\) for \(m\ge 0\text{.}\)
  3. \(G_n =\) the complete bipartite graph \(K_{n,n}\) for \(n \ge 1\text{.}\)

Subsubsection Exercises for 6.5.B Modeling with Explicitly-defined Sequences

9. Practice.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(a\) begins \(1, 1, 1, 1, 1, 1, \ldots\)
  2. The sequence \(b\) begins \(-2, 2, -2, 2, -2, 2, \ldots\)
  3. The sequence \(c\) begins \(0,-1,2,-3,4,-5,6, \ldots\)
  4. The sequence \(d\) begins \(0,1,-2,3,-4,5,-6, \ldots\)
Check.
  1. \(a_n=1\) for \(n \ge 0\)
  2. Hint: The answer involves \((-1)^n\) starting at \(n=0\text{.}\)
  3. Hint: Start at \(n=0\text{.}\)
  4. Hint: The answer involves \((-1)^{n-1}\) starting at \(n=0\text{.}\)

10. Practice.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Hint: Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(a\) begins \(1, 6, 11, 16, 21, \ldots\text{.}\)
  2. The sequence \(b\) begins \(0.1, 0.01, 0.001, 0.0001, \ldots\text{.}\)
  3. The sequence \(c\) begins \(-4, 7, -10, 13, -16, 19, -22, \ldots\text{.}\)
  4. The sequence \(d\) begins \(2, -10, 50, -250, 1250, \ldots\text{.}\)
Check.
  1. Hint: The answer involves \(5n\text{.}\)
  2. Hint: The answer involves \((.1)^n\text{.}\)
  3. Hint: Find a formula for the absolute value of the terms first.
  4. Hint: Find a formula for the absolute value of the terms first.

11. Understand.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Make a table showing the index \(n\) and the terms of the sequence. Each rule involves a factorial, handshake, floor, or ceiling function.
  1. The sequence \(a\) begins \(2,6,12,20,30, \ldots\text{.}\)
  2. The sequence \(b\) begins \(3, 6, 18, 72, 360, , \ldots\text{.}\)
  3. The sequence \(c\) begins \(3, 4, 6, 9, 13, 18, \ldots\)
  4. The sequence \(d\) begins \(1,1,1,1,2,2,2,2,3,3,3,3, \ldots\text{.}\)
Check.
  1. Hint: Involve the handshake numbers such as \(\frac{n(n-1)}{2}\) or \(\frac{n(n+1)}{2}\text{.}\)
  2. Hint: Involves factorials.
  3. Hint: What are we adding to get from each term to the next?
  4. Hint: Floor or ceiling is involved, and a fraction.

12. Understand.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Hints: Make a table showing the index \(n\) and the terms of the sequence. Each rule involves adding or subtracting a constant.
  1. The sequence \(a\) begins \(7,8, 9, 10, 11, 12, 13, \ldots\)
  2. The sequence \(b\) begins \(0, 1, 3, 7, 15, 31, 63, 127, 255, \ldots\)
  3. The sequence \(c\) begins \(2, 5, 10, 17, 26, 37, \ldots\)
  4. The sequence \(d\) begins \(2, 3, 7, 25\text{,.}\)
Check.
  1. \(a_n=n+7\) for \(n \ge 0\text{.}\)
  2. Hint: Look at the terms + 1.
  3. Hint: Look at the terms -1
  4. Hint: Look at the terms + 1 or -1.

13. Understand.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Hint: Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(a\) begins \(\frac{1}{3}, \frac{1}{4}, \frac{1}{5}, \frac{1}{6}, \frac{1}{7}, \ldots\)
  2. The sequence \(b\) begins \(1, \frac{4}{3}, \frac{3}{2}, \frac{8}{5}, \frac{5}{3}, \ldots\) Another hint: Unreduce fractions
  3. The sequence \(c\) begins \(1, \frac{3}{4}, \frac{5}{9}, \frac{7}{16}, \frac{9}{25}, \underline{\hspace{.3in}~}, \ldots\)
  4. The sequence \(d\) begins \(0, \frac{7}{6}, \frac{26}{9}, \frac{21}{4}, \frac{124}{15}, \frac{215}{18}, \underline{\hspace{.3in}~}\text{.}\)
Check.
  1. \(a_n =\frac{1}{n+3}\) for \(n \ge 0\text{.}\)
  2. Hint: Rewrite with denominators \(2, 3, 4, 5, 6\text{.}\)
  3. Hint: The answer involves odds and squares.
  4. Hint: Powers are involved.

14. Understand.

Write a simple explicit rule that generates each sequence.
  1. The sequence \(a\) begins \(0, 5, 12, 21, 32, 45, \ldots\text{.}\) Hint: Start the index at 0. Factor.
  2. The sequence \(b\) begins \(4, 12, 24, 40, 60, 84, \ldots\) Hint: Start the index at 1. Factor.
  3. The sequence \(c\) begins \(2, 18, 60, 140, 270, \ldots\)
Check.
  1. Hint: \(n\) is a factor.
  2. \(\displaystyle b_n=2n(n+1)\)
  3. Hint: Factor out \(n\text{.}\) Then factor again.

15. Understand.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Use a piecewise-defined rule. Hint: Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(a\) begins \(0, 2, 0, 2, 0, 2, \ldots\)
  2. The sequence \(b\) begins \(1,4,3,8,5,12,7,16,9,20,\ldots\)
  3. The sequence \(c\) begins \(0, 0, 8, 0, 0, 64, 0, 0, 512, \ldots\)
Check.
  1. Hint: The answer can be written in the form
    \begin{equation*} a_n= \left\{ \begin{array}{cl} 0 \amp \text{ if } n \text{ is \underline{\hspace{.5in}}} \\ 1 \amp \text{ if } n \text{ is \underline{\hspace{.5in}}} \end{array} \right.\text{.} \end{equation*}
    for \(n \ge 0\text{.}\)
  2. Hint: Use different formulas for odd index and even index terms.
  3. Hint: The nonzero terms are powers of two.

16. Understand.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts.
  1. The sequence \(a\) begins \(0.1, 0.01, 0.001, 0.0001, \ldots\text{.}\)
  2. The sequence \(b\) begins \(3, 4, 6, 9, 13, 18, \ldots\text{.}\)
  3. The sequence \(c\) begins \(1, 2, 5, 10, 17, 26, 37, \ldots\text{.}\)
  4. The sequence \(d\) begins \(1, \frac{3}{4}, \frac{5}{9}, \frac{7}{16}, \frac{9}{25}, \ldots\text{.}\)

17. Understand.

Write a simple explicit rule in words that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts.
  1. The sequence \(a\) begins \(\{0,1\}, \{1,2\}, \{2,3\}, \{3,4\},\ldots\text{.}\)
  2. The sequence \(b\) begins \(\{0,1\}, \{1,2\}, \{3,4\}, \{7,8\}, \{15,16\},\ldots\text{.}\)
  3. The sequence \(c\) begins \(\bs{10}\text{,}\) \(\bs{1100}\text{,}\) \(\bs{111000}\text{,}\) \(\bs{11110000}\text{,}\)
  4. The sequence \(d\) begins \(\bs{01}\text{,}\) \(\bs{1010}\text{,}\) \(\bs{010101}\text{,}\) \(\bs{10101010}\text{,}\)

18. Recap.

Do you know …
  1. What type of rule follows the pattern that each term of the sequence is the previous term plus a constant? Times a constant?
  2. What type of pattern in a sequence suggests a rule that involves factorials? The handshake numbers?
  3. How to build a rule for a sequence that alternates between two values, or between positive and negative?
  4. What strategies you can use when modeling a sequence of fractions?

19. Explore.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Do not a piecewise-defined rule. Hint: Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(a\) begins \(0, 2, 0, 2, 0, 2, \ldots\)
  2. The sequence \(b\) begins \(\frac{1}{2}, 2, \frac{1}{2}, 2,\frac{1}{2}, 2,\frac{1}{2}, 2, \ldots\) Β Β  Another hint: \(2^{-1}= \frac{1}{2}\text{.}\)

20. Explore.

Write a simple explicit rule that generates each sequence. Start the index at 0 or 1 (your choice), being sure to state where your sequence starts. Hint: Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(s\) begins \(0,1,2,3,0,1,2,3\text{.}\) Note: Do not a piecewise-defined rule. Can you write a rule involving \text{ mod } instead?
  2. The sequence \(t\) begins \(0,1,4,9,6,5,6,9,4,1,0,1,4,9, \ldots\text{.}\) Note: Do not a piecewise-defined rule. Can you write a rule in words instead? Hint: \(1,4,9\) are squares.
  3. The sequence \(u\) begins \(1,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,\ldots\text{.}\) Write a piecewise function. Hint: Where are the 1s?
Check.
  1. \(s_n=a \fn{ mod } 3\) for \(n \ge 0\)
  2. Hint: Last digit
  3. Hint: Handshakes.

Subsubsection Exercises for 6.5.C Detour: Sequences Involving Primes

23. Understand.

Evaluate the first six terms of each sequence starting at \(n=1\text{.}\)
  1. \begin{equation*} b_n= \left\{ \begin{array}{ll} 0 \amp \text{ if } n \text{ is prime } \\ n \amp \text{ otherwise } \end{array} \right.\text{.} \end{equation*}
  2. \begin{equation*} v_i= \left\{ \begin{array}{ll} 1 \amp \text{ if } i=1 \\ i^2 \amp \text{ if } i \text{ is prime } \\ i \amp \text{ if } i \text{ is composite } \end{array} \right.\text{.} \end{equation*}
Check.
  1. Hint: It begins \(1,0,0,4\ldots\text{.}\)
  2. Hint: It begins \(1, 4, 9, 4, \ldots\text{.}\)

24. Understand.

Write a simple explicit rule in words that generates each sequence. Start the index at 1. Hint: Make a table showing the index \(n\) and the terms of the sequence. The rule involves the prime factorization of the index.
  1. The sequence \(x\) begins \(1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, \underline{~},\ldots\)
  2. The sequence \(y\) begins \(1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5, \underline{~},\ldots\)
Check.
  1. Hint: Every term in the sequence is a power of two and a divisor of the index.
  2. Hint: Each term is a prime and a divisor of the index.

25. Understand.

For each sequence, write a simple explicit rule of the form
\begin{equation*} a_n = \left\{ \begin{array}{ll} \underline{\hspace{.5in}} \amp \text{ if } n=1 \\ \underline{\hspace{.5in}} \amp \text{ if } n \text{ is prime } \\ \underline{\hspace{.5in}} \amp \text{ if } n \text{ is composite } \end{array} \right.\text{.} \end{equation*}
that generates the sequence. Start the index at 1. Hint: Make a table showing the index \(n\) and the terms of the sequence.
  1. The sequence \(a\) begins \(0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0,\ldots\)
  2. The sequence \(b\) begins \(0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13,\ldots\)
Check.
  1. Hint: Where are the 1s?
  2. Hint: When \(n\) is prime, the formula is \(n\text{.}\)

26. Understand.

Write a simple explicit rule in words that generates the each sequence. Start the index at 1. Hints: The rule involves the prime sequence \(\pi_n\text{.}\) Make a table showing the index \(n\text{,}\) the value of \(\pi_n\text{,}\) and the terms of the sequence.
  1. The sequence \(c\) begins \(4, 9, 25, 49, 121, 169, 289,\ldots\)
  2. The sequence \(d\) begins \(1, 2, 4, 6, 10, 12, 16,\ldots\)
Check.
  1. Hint: Square
  2. Hint: Either +1 or -1 is involved.

27. Recap.

Do you know …
  1. How to evaluate or model a sequence where the terms depend on the prime factorization of the index?
  2. How to evaluate or model a sequence where the rule depends (piecewise) on the primality of the index?
  3. What the sequence \(\pi_n\) is and the first ten terms?
  4. How to evaluate or model a sequence where the terms depend on the sequence \(\pi_n\text{?}\)

28. Explore.

Write a simple explicit rule in words that generates the each sequence. Start the index at 1. Hints: The rule involves the prime sequence \(\pi_n\text{.}\) Make a table showing the index \(n\text{,}\) the value of \(\pi_n\text{,}\) and the terms of the sequence.
  1. The sequence \(s\) begins \(2, 5, 11, 17, 23, 31, 41,\ldots\)
  2. The sequence \(t\) begins \(6, 15, 35, 77, 143, 221, ,\ldots\) Hint: factor
Check.
  1. Hint: Write each term as \(\pi_n\text{.}\) For example, \(2 = \pi_1\) and \(5 = \pi_3\text{.}\)
  2. Hint: Factor into primes.