41 Sequences

41 Sequences - Handout #41 February 22, 2008 CS103A Robert...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Handout #41 CS103A February 22, 2008 Robert Plummer Sequences and Summations A mathematician, like a poet or a painter, is a maker of patterns. G.H. Hardy A Mathematician’s Apology (1940) Sequences Imagine a person (with a lot of spare time) who decides to count her ancestors. She has two parents, four grandparents, eight great-grandparents, and so forth. We could write these numbers in a row: 2, 4, 8, 16, 32, 64, … (where the … means and so forth). To express a pattern of numbers in this manner, we often label the position of each number in the row as in the following table. 1 2 3 4 5 6 2 4 8 16 32 64 When represented in this manner it is easy to recognize a formula that would give us the kth element in the row: A k = 2 k . Note that we are just making an observation based on evidence in guessing this formula. We would need to do a proof to be absolutely certain. A sequence is an ordered list of elements written in a row, such that each element has a unique position in the list. We use a k to denote a single element of a sequence called a term . The k in a k is called a subscript or index . An explicit formula for a sequence is a rule that shows how the value of a k is derived from k. What is the programming analogy of a sequence? A common problem in computer science is determining an explicit formula given only the first few elements of a sequence. When trying to find such a formula we try to find a pattern. A good place to start is in asking the following questions: Are there runs of the same values? Are terms obtained from previous terms by adding the same amount, or an amount that depends on position in the sequence? Are terms obtained from previous terms by multiplying by a particular amount? Are terms obtained by combining previous terms in a certain way?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Here are some practice problems: 7, 11, 15, 19, 23, 27, 31, 35. .. 3, 6, 11, 18, 27, 38, 51, 66, 83. .. 0, 2, 8 26, 80, 242, 728, 2186, 6560, 19682. .. And just for fun: O, T, T, F, F, S, S, E, . .. Summation & Product Notation
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/01/2011 for the course CS 103A taught by Professor Plummer,r during the Winter '07 term at Stanford.

Page1 / 7

41 Sequences - Handout #41 February 22, 2008 CS103A Robert...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online