From the course: Programming Foundations: Numerical Mathematics and Calculations
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Arithmetic and geometric progression - Python Tutorial
From the course: Programming Foundations: Numerical Mathematics and Calculations
Arithmetic and geometric progression
- [Instructor] We are going to explore the two most popular special types of sequences called the arithmetic progression and geometric progression. Let's look at the following sequence that starts with two. Pause the video and see if you can spot the pattern. (upbeat music playing) We start with two and then get the second term by adding first term two plus three, and we get five. We get the third term by adding the second term that is five with three again, and we get eight. So in our case, we could write a1 equals two, a2 equals a1 plus three. a3 equals a2 plus three, and the general term would be an equals an minus one plus three, or an equals two plus n minus one multiplied by three. We could get this formula by using substitution. Our sequence is special because it follows a pattern where each term is obtained by adding free to the previous term. This kind of sequence is called an automatic progression. It is defined…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.