# HO28 - Maggie Johnson CS103A Handout#28 Sequences and...

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

Maggie Johnson Handout #28 CS103A Sequences and Summations Key topics: Sequences Arithmetic and Geometric Progressions Fractals 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 time on their hands) that decides to count their 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?

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

View Full Document
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?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

HO28 - Maggie Johnson CS103A Handout#28 Sequences and...

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

View Full Document
Ask a homework question - tutors are online