Let us look at an example first, imagine there is the following sequence:2, 4, 6, 8, 9, 10...Let the difference be constant d, in this case d = 2If I were to ask what would be the value of the 10th number in the sequence, how would you calculate it?a1= 2a2 = 4so if you just keep on adding a10 = 18This is easy if the numbers are small, however what if I were to ask for the 100th number or even 10000th number?To make it easier we need to come up with a formula that can calculate it let's substitute the numbers with variables. Let's take the previous example.a1= 2 ;a2 = 4 ; a2 - a1= 2 = d ;if we rearrange this equation,a2= a1 + d ;a3= a2 + d = a1 + d + d ;a4= a3 + d = a1 + d + d +d ;
do you see a trend, its always one added d an = a1 + (n-1)*dSo let us say I would want to know what given that d = 2 and the initial value a1 = 2 and I want to find the 20th value, if we use the equationan = a1 + (n-1)*da20 = 2 + (20 -1)2 = 2 +192 = 2 + 38 = 40