|
| 1 | +# Arithmetic Progression |
| 2 | + |
| 3 | +A sequence of numbers is said to be in an `Arithmetic progression` if the difference between any two consecutive terms is always the same. In simple terms, it means that the next number in the series is calculated by adding a fixed number to the previous number in the series. |
| 4 | +For example, 2, 4, 6, 8, 10 is an AP because the difference between any two consecutive terms in the series (common difference) is same (4 - 2 = 6 - 4 = 8 - 6 = 10 - 8 = 2). |
| 5 | +<p align="center"> |
| 6 | + <img width="60%" src="https://user-images.githubusercontent.com/75872316/122635132-ce38d100-d0ff-11eb-8fdf-2e14a9f640cc.png"> |
| 7 | +</p> |
| 8 | + |
| 9 | +**Facts about Arithmetic Progression:** |
| 10 | + |
| 11 | +1. Initial term: In an arithmetic progression, the first number in the series is called the initial term. |
| 12 | +2. Common difference: The value by which consecutive terms increase or decrease is called the `common difference`. |
| 13 | +3. The behavior of the arithmetic progression depends on the common difference `d`. If the common difference is positive, then the members (terms) will grow towards positive infinity. But if the common difference is negative, then the members (terms) will grow towards negative infinity. |
| 14 | + |
| 15 | +**Formula of the nth term of an A.P:** |
| 16 | + |
| 17 | +`a` is the initial term, and `d` is a common difference. Thus, the explicit formula is: |
| 18 | +<p align="center"> |
| 19 | + <img width="60%" src="https://user-images.githubusercontent.com/75872316/122635193-25d73c80-d100-11eb-9015-344d36633704.png"> |
| 20 | +</p> |
| 21 | + |
| 22 | +**Formula of the sum of first nth term of A.P:** |
| 23 | + |
| 24 | +<p align="center"> |
| 25 | + <img width="60%" src="https://user-images.githubusercontent.com/75872316/122635260-7a7ab780-d100-11eb-82a5-8ceeba3aff03.png"> |
| 26 | +</p> |
| 27 | + |
| 28 | +**General Formulas to solve problems related to Arithmetic Progressions:** |
| 29 | + |
| 30 | + If `a` is the first term and `d` too, that would be a common difference: |
| 31 | +- **nth term of an AP** = `a + (n-1)*d`. |
| 32 | +- **Arithmetic Mean** = `Sum of all terms in the AP / Number of terms in the AP`. |
| 33 | +- **Sum of ‘n’ terms** of an AP = 0.5 n (first term + last term) = `0.5 n [ 2a + (n-1) d ]`. |
| 34 | + |
| 35 | +# Source |
| 36 | + |
| 37 | +- [Arithmetic Progression](https://www.geeksforgeeks.org/arithmetic-progression) |
| 38 | + |
| 39 | +# YouTube |
| 40 | + |
| 41 | +- [Video URL for concept](https://youtu.be/gua96ju_FBk) |
| 42 | +- [Video for understanding AP Dynamic Programming in C++](https://youtu.be/U_qtSRQYoPs) |
0 commit comments