nth term in AP
a + (n-1)d
sum of n terms in AP
(n/2) x (first term + last term)
or
(n/2) x (2a + [n-1]d)
number of terms b/w 5 and 9
last - first - 1
= 9 - 5 -1
= 3
number of terms b/w 5 and 9, inclusive
last - first + 1
= 9 - 5 + 1
= 5
number of terms from 5 to 9
last - first + 1
= 9 - 5 + 1
= 5
number of terms from 5 to 9, exclusive
last - first - 1
= 9 - 5 -1
= 3
nth term in GP
a x r^(n-1)
Sum of n terms in GP
a x ([1- r^n] / [1 - r])
Sum of n terms in HP
(middle term) x n