CS 261 Homework 3

CS 261 Homework 3
Spring 2017
Homework should be saved in PDF format and submitted to UNM Learn.
1. What are the terms a0 , a1 , a2 , and a3 of the following sequences?
(a) an = (−1)n .
(b) an = 3.
(c) an = 7 + 4n .
(d) an = 2n + (−2)n .
(e) an =
√
1+ 5
2
n −
√
5
√
1− 5
2
n
.
2. List the first 5 terms of each of these sequences.
(a) The sequence obtained by starting with 100 and obtaining each term by subtracting 5 from the previous term.
(b) The sequence whose nth term is the sum of the squares of the first n positive
integers.
√
(c) The sequence whose nth term is b nc.
(d) The sequence whose first two terms are 1 and 2 and each succeeding term is the
sum of the two previous terms.
3. For each of these lists of integers, provide a simple formula or rule that generates
the terms of an integer sequence that begins with the given list. Assuming that your
formula or rule is correct, determine the next three terms of the sequence.
(a) 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, . . .
(b) 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, . . .
(c) 1, 0, 2, 0, 4, 0, 8, 0, 16 , 0, . . .
(d) 3, 6, 12, 24, 48, 96, 192, . . .
(e) 15, 8, 1, -6, -13, -20, -27, . . .
(f) 3, 5, 8, 12, 17, 23, 30, 38, 47, . . .
1
4. Show that
Pn
1
j=1 j(j+1)
=
n
.
n+1
5. Calculate the following sums. Show the steps of your calculation.
(a)
P200
(b)
P20
(c)
(d)
j=100
j.
j
j=10 2 .
Pn
j=100 j.
Pn
j
j=10 2 .
6. Find the solution to each of these recurrence relations and prove the correctness of
your solution using mathematical induction.
(a) an = −an−1 , a0 = 5.
(b) an = an−1 + 3, a0 = 1.
(c) an = an−1 − n, a0 = 4.
(d) an = (n + 1)an−1 , a0 = 2.
(e) an = 2an−1 − an−2 , a1 = 1, a2 = 1.
(f) an = 2an−1 − an−2 + 1, a1 = 1, a2 = 1.
7. Find a simple analytical form for the sum Sn of the following sequences, and use
mathematical induction to prove the correctness.
(a) an = 2n − 1 and Sn = a1 + a2 + . . .
(b) an = n2 and Sn = a1 + a2 + . . .
2