Number Sequences Lecture 7: Sep 27 (chapter 4.1 of the book and chapter 9.1-9.2 of the notes) ? overhang.

Slides:



Advertisements
Similar presentations
New Jersey Center for Teaching and Learning
Advertisements

Annuities and Sinking Funds
The Time Value of Money: Annuities and Other Topics
SEQUENCES and INFINITE SERIES
Number Sequences Lecture 5 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.
Week 5 - Friday.  What did we talk about last time?  Sequences  Summation and production notation  Proof by induction.
Sequences, Series, and the Binomial Theorem
9-4 Sequences & Series. Basic Sequences  Observe patterns!  3, 6, 9, 12, 15  2, 4, 8, 16, 32, …, 2 k, …  {1/k: k = 1, 2, 3, …}  (a 1, a 2, a 3, …,
Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.
Math Calculus I August 9 (but first, a quick review…)
CSC2110 Discrete Mathematics Tutorial 4 Number Sequence Hackson Leung.
259 Lecture 3 Spring 2015 Finance Applications with Excel – Annuities an Amortization.
TIME VALUE OF MONEY CHAPTER 5.
Understanding 8.1… Use sigma notation to write the sum of.
Sec 11.3 Geometric Sequences and Series Objectives: To define geometric sequences and series. To define infinite series. To understand the formulas for.
Chapter 4 The Time Value of Money
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
Sequences and Series A sequence is an ordered list of numbers where each term is obtained according to a fixed rule. A series, or progression, is a sum.
Introduction to sequences and series A sequence is a listing of numbers. For example, 2, 4, 6, 8,... or 1, 3, 5,... are the sequences of even positive.
1 © 2010 Pearson Education, Inc. All rights reserved 10.1 DEFINITION OF A SEQUENCE An infinite sequence is a function whose domain is the set of positive.
Chapter Sequences and Series.
Number Sequences Lecture 7: Sep 29 ? overhang. This Lecture We will study some simple number sequences and their properties. The topics include: Representation.
MATH 224 – Discrete Mathematics
9-2 Arithmetic Sequences & Series.  When another famous mathematician was in first grade, his teacher asked the class to add up the numbers one through.
Sequences Informally, a sequence is a set of elements written in a row. – This concept is represented in CS using one- dimensional arrays The goal of mathematics.
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
A summary of the algebra concepts. Sequences and Series Some sequences are arithmetic because there is a common difference between terms. We call the.
Chapter 6 Sequences And Series Look at these number sequences carefully can you guess the next 2 numbers? What about guess the rule?
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Sequences & Series Pre-Calculus Lesson 9.1. Infinite Sequence: A sequence without bound - - 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, … ? (what’s next 2 terms)
Introduction to sequences and series
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
Sequences and Summations
CHAPTER 10 Sequences, Induction, & Probability Sequences & Summation Notation Objectives –Find particular terms of sequence from the general term.
Number Sequences ? overhang. This Lecture We will study some simple number sequences and their properties. The topics include: Representation of a sequence.
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Arithmetic Sequence Chapter 2, lesson C. IB standard Students should know Arithmetic sequence and series; sum of finite arithmetic series; geometric sequences.
A list of numbers following a certain pattern a 1, a 2, a 3, a 4, …, a n, … Pattern is determined by position or by what has come before 25. Sequences.
By Sheldon, Megan, Jimmy, and Grant..  Sequence- list of numbers that usually form a pattern.  Each number in the list is called a term.  Finite sequence.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
CHAPTER 5 INTRODUCTION TO VALUATION: THE TIME VALUE OF MONEY.
Algebra II Unit 1 Lesson 2, 3 & 5
13.1 SEQUENCES Functions Modeling Change: A Preparation for Calculus, 4th Edition, 2011, Connally.
Math 104 Calculus I Part 6 INFINITE SERIES. Series of Constants We’ve looked at limits and sequences. Now, we look at a specific kind of sequential limit,
Sequences and Series (Section 9.4 in Textbook).
SERIES: PART 1 Infinite Geometric Series. Progressions Arithmetic Geometric Trigonometric Harmonic Exponential.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Lecture Outline Basic time value of money (TVM) relationship
Introduction to Valuation: The Time Value of Money Chapter 5 Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin.
Lecture 2.5: Sequences CS 250, Discrete Structures, Fall 2014 Nitesh Saxena Adopted from previous lectures by Zeph Grunschlag.
Chapter 11 Sequences and Series
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
Unit 9: Sequences and Series. Sequences A sequence is a list of #s in a particular order If the sequence of numbers does not end, then it is called an.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
8.1 – Sequences and Series. Sequences Infinite sequence = a function whose domain is the set of positive integers a 1, a 2, …, a n are the terms of the.
Arithmetic Sequences and Series Section Objectives Use sequence notation to find terms of any sequence Use summation notation to write sums Use.
Essential Question: How do you find the nth term and the sum of an arithmetic sequence? Students will write a summary describing the steps to find the.
CS 2210 (22C:19) Discrete Structures Sequence and Sums
CS 2210:0001 Discrete Structures Sequence and Sums
Warm-Up Find the sixth term of the sequence
Infinite Geometric Series
Ch. 8 – Sequences, Series, and Probability
Sequences, Induction, & Probability
CS 2210:0001 Discrete Structures Sequence and Sums
9.1: Introduction to Sequences
Geometric Sequences and Series
Presentation transcript:

Number Sequences Lecture 7: Sep 27 (chapter 4.1 of the book and chapter of the notes) ? overhang

This Lecture We will study some simple number sequences and their properties. The topics include: Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence Product of a sequence Factorial

Number Sequences In general a number sequence is just a sequence of numbers a 1, a 2, a 3, …, a n (it is an infinite sequence if n goes to infinity). We will study sequences that have interesting patterns. e.g. a i = i a i = i 2 a i = 2 i a i = (-1) i a i = i/(i+1) 1, 2, 3, 4, 5, … 1, 4, 9, 16, 25, … 2, 4, 8, 16, 32, … -1, 1, -1, 1, -1, … 1/2, 2/3, 3/4, 4/5, 5/6, …

Finding General Pattern a 1, a 2, a 3, …, a n, … 1/4, 2/9, 3/16, 4/25, 5/36, … 1/3, 2/9, 3/27, 4/81, 5/243,… 0, 1, -2, 3, -4, 5, … 1, -1/4, 1/9, -1/16, 1/25, … General formula Given a number sequence, can you find a general formula for its terms? a i = i/(i+1) 2 a i = i/3 i a i = (i-1)·(-1) i a i = (-1) i+1 / i 2

Recursive Definition We can also define a sequence by writing the relations between its terms. e.g. a i = 1 when i=1 a i-1 +2 when i>1 1, 3, 5, 7, 9, …, 2n+1, … a i = 1 when i=1 or i=2 a i-1 +a i-2 when i>2 1, 1, 2, 3, 5, 8, 13, 21, …, ??, … Fibonacci sequence Will compute its general formula in a later lecture. Just for fun: see the “3n+1 conjecture” in the project page. a i = 1 when i=1 2a i-1 when i>1 1, 2, 4, 8, 16, …, 2 n, …

Proving a Property of a Sequence a i = 3 when i=1 (a i-1 ) 2 when i>1 What is the n-th term of this sequence? Step 1: Computing the first few terms, 3, 9, 81, 6561, … Step 2: Guess the general pattern, 3, 3 2, 3 4, 3 8, …, 3 2 ?,… Step 3: Prove by induction that a i =3 2 Base case: a 1 =3 n i-1 Induction step: assume a i =3 2, prove a i+1 =3 2 i-1i a i+1 = (a i ) 2 = (3 2 ) 2 =3 2 i-1i

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) The integral method Product of a sequence Factorial

Sum of a Sequence We have seen how to prove these equalities by induction, but how do we come up with the right hand side?

Summation (adding or subtracting from a sequence) (change of variable)

Summation Write the sum using the summation notation.

A Telescoping Sum Step 1: Find the general pattern. a i = 1/i(i+1) Step 2: Manipulate the sum. (partial fraction) (change of variable)

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) The integral method Product of a sequence Factorial

Sum for Children ··· ··· · · · ··· ··· Nine-year old Gauss saw 30 numbers, each 13 greater than the previous one. 1 st + 30 th = = nd + 29 th = (1 st +13) + (30 th  13) = rd + 28 th = (2 nd +13) + (29 th  13) = 555 So the sum is equal to 15x555 = 8325.

Arithmetic Sequence A number sequence is called an arithmetic sequence if a i+1 = a i +d for all i. e.g. 1,2,3,4,5,… 5,3,1,-1,-3,-5,-7,… What is the formula for the n-th term? a i+1 = a 1 + i·d(can be proved by induction) What is the formula for the sum S= …+n? Write the sum S = … + (n-2) + (n-1) + n Write the sum S = n + (n-1) + (n-2) + … Adding terms following the arrows, the sum of each pair is n+1. We have n pairs, and therefore 2S = n(n+1), and thus S = n(n+1)/2.

Arithmetic Sequence What is a simple expression of the sum? Adding the equations together gives: Rearranging and remembering that a n = a 1 + (n − 1)d, we get: A number sequence is called an arithmetic sequence if a i+1 = a i +d for all i.

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) The integral method Product of a sequence Factorial

Geometric Sequence A number sequence is called a geometric sequence if a i+1 = r·a i for all i. e.g. 1, 2, 4, 8, 16,… 1/2, -1/6, 1/18, -1/54, 1/162, … What is the formula for the n-th term? a i+1 = r i ·a 1 (can be proved by induction) What is the formula for the sum S= …+3 n ? Write the sum S = … + 3 n n n Write the sum 3S = … + 3 n n n + 3 n+1 Subtracting the second equation by the first equation, we have 2S = 3 n+1 - 1, and thus S = (3 n+1 – 1)/2.

Geometric Series What is a simple expression of G n ? G n  xG n =1  x n+1

Infinite Geometric Series Consider infinite sum (series) for |x| < 1

Some Examples

In-Class Exercise Prove: If 2 n -1 is prime, then n is prime. Prove the contrapositive: If n is composite, then 2 n -1 is composite. Note that 2 n -1=1+2+…+2 n-1 First see why the statement is true for say n=6=2·3 or n=12=3·4

In-Class Exercise Prove: If 2 n -1 is prime, then n is prime. Prove the contrapositive: If n is composite, then 2 n -1 is composite. Note that 2 n -1=1+2+…+2 n-1 Let n=pq Then 2 pq – 1 = … + 2 pq-1 and the sequence has pq terms. Put q consecutive numbers into one group, then we have exactly p groups. The i-th group is equal to 2 (i-1)q + 2 (i-1)q+1 + … + 2 (i-1)q+(q-1). So the i-th group is equal to 2 (i-1)q ( … + 2 q-1 ) So the whole sequence is equal to ( … + 2 q-1 )(1 + 2 q + 2 2q + … 2 (p-1)q ).

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) The integral method Product of a sequence Factorial

The Value of an Annuity Would you prefer a million dollars today or $50,000 a year for the rest of your life? An annuity is a financial instrument that pays out a fixed amount of money at the beginning of every year for some specified number of years. Examples: lottery payouts, student loans, home mortgages. A key question is what an annuity is worth. In order to answer such questions, we need to know what a dollar paid out in the future is worth today.

My bank will pay me 3% interest. define bankrate b ::= bank increases my $ by this factor in 1 year. The Future Value of Money So if I have $X today, One year later I will have $bX Therefore, to have $1 after one year, It is enough to have b  X  1. X  $1/1.03 ≈ $0.9709

$1 in 1 year is worth $ now. $1/b last year is worth $1 today, So $n paid in 2 years is worth $n/b paid in 1 year, and is worth $n/b 2 today. The Future Value of Money $n paid k years from now is only worth $n/b k today

Someone pays you $100/year for 10 years. Let r ::= 1/bankrate = 1/1.03 In terms of current value, this is worth: 100r + 100r r 3 +  + 100r 10 = 100r(1+ r +  + r 9 ) = 100r(1  r 10 )/(1  r) = $ $n paid k years from now is only worth $n/b k today Annuities

I pay you $100/year for 10 years, if you will pay me $ QUICKIE: If bankrates unexpectedly increase in the next few years, A.You come out ahead B.The deal stays fair C.I come out ahead

Annuities In terms of current value, this is worth: r r 2 +  = 50000(1+ r +  ) = 50000/(1  r) Let r = 1/bankrate If bankrate = 3%, then the sum is $ If bankrate = 8%, then the sum is $ Would you prefer a million dollars today or $50,000 a year for the rest of your life?

Loan Suppose you were about to enter college today and a college loan officer offered you the following deal: $25,000 at the start of each year for four years to pay for your college tuition and an option of choosing one of the following repayment plans: Plan A: Wait four years, then repay $20,000 at the start of each year for the next ten years. Plan B: Wait five years, then repay $30,000 at the start of each year for the next five years. Assume interest rate 7% Let r = 1/1.07.

Plan A: Wait four years, then repay $20,000 at the start of each year for the next ten years. Plan A Current value for plan A

Plan B Current value for plan B Plan B: Wait five years, then repay $30,000 at the start of each year for the next five years.

Profit $25,000 at the start of each year for four years to pay for your college tuition. Loan office profit = $3233.

Suppose there is an annuity that pays im dollars at the end of each year i forever. For example, if m = $50, 000, then the payouts are $50, 000 and then $100, 000 and then $150, 000 and so on… More Annuities What is a simple closed form expression of the following sum?

Manipulating Sums (Optional) What is a simple closed form expression of ? (can also be proved by induction)

Manipulating Sums for x < 1 For example, if m = $50, 000, then the payouts are $50, 000 and then $100, 000 and then $150, 000 and so on… For example, if b=1.08, then V= Still not infinite! Exponential decrease beats additive increase.

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) The integral method Product of a sequence Factorial

Harmonic Number How large is? … 1 number 2 numbers, each 1/4 4 numbers, each 1/8 2 k numbers, each 1/2 k+1 Row sum is = 1/2 The sum of each row is = 1/2. … Finite or infinite?

Harmonic Number How large is? … The sum of each row is = 1/2. … k rows have totally 2 k -1 numbers. If n is between 2 k -1 and 2 k+1 -1, there are >= k rows and <= k+1 rows, and so the sum is at least k/2 and is at most (k+1).

Overhang (Optional) ? overhang How far can you reach? If we use n books, the distance we can reach is at least H n /2, and thus we can reach infinity! See “Overhang” in the project page, or come to the next extra lecture.

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) The integral method Product of a sequence Factorial

1 x Harmonic Number There is a general method to estimate H n. First, think of the sum as the total area under the “bars”. Instead of computing this area, we can compute a “smooth” area under the curve 1/(x+1), and the “smooth” area can be computed using integration techniques easily.

More Integral Method (Optional) What is a simple closed form expressions of ? Idea: use integral method. So we guess that Make a hypothesis

Sum of Squares (Optional) Make a hypothesis Plug in a few value of n to determine a,b,c,d. Solve this linear equations gives a=1/3, b=1/2, c=1/6, d=0. Go back and check by induction if

This Lecture Representation of a sequence Sum of a sequence Arithmetic sequence Geometric sequence Applications Harmonic sequence (Optional) A general method Product of a sequence Factorial

Product

Factorial defines a product: Factorial How to estimate n!? Too rough… Still very rough, but at least show that it is much larger than C n for any constant C.

Factorial defines a product: Turn product into a sum taking logs: ln(n!) = ln(1·2·3 ··· (n – 1)·n) = ln 1 + ln 2 + ··· + ln(n – 1) + ln(n) Factorial How to estimate n!?

… ln 2 ln 3 ln 4 ln 5 ln n-1 ln n ln 2 ln 3 ln 4 ln 5 ln n 23145n–2n–1n ln (x+1) ln (x) Integral Method (Optional) exponentiating: Stirling’s formula:

Quick Summary You should understand the basics of number sequences, and understand and apply the sum of arithmetic and geometric sequences. Harmonic sequence is useful in analysis of algorithms. In general you should be comfortable dealing with new sequences. The methods using differentiation and integration are optional, but they are the key to compute formulas for number sequences. The Stirling’s formula is very useful in probability, but we won’t use it much in this course.