------------------------------------------------------------------

sum= 1/a + ( 1/[a+r] + 1/[a-r] ) + ( 1/[a+2r] + 1[/a-2r] ) + ( 1/[a+3r] + 1/[a-3r] ) + ........
= 1/a + 2a [ 1/(a^2 - r^2 ) + 1/(a^2 - 4r^2 ) + 1/(a^2 - 9r^2 ) +........] where
1/a is 1st term, each term in the bracket*2a represents sum of 2 terms.Thus the
total terms above are 7, one outside bracket and three pairs inside.Thus the above
formula can be used to evaluate sum of ODD no. of terms. If there are even no. of
terms, then one can evaluate the sum of preceding ODD terms and add 2a/(a + nr)
where n is number of the last term. If a=1 and r= -4 and n= infinity it is Madhab-Gregory Series i.e
1- 1/3 + 1/5 -1/7 + 1/9 -.............

and PI/4 = 1- 1/3 + 1/5 -1/7 + 1/9 -............ upto infinity.

Named after the famous Indian mathematician Madhab who lived 1340 AD to 1425 AD & German Mathematician Gregory who rediscovered it in 1671. When number of terms become infinite, it converges to PI/4. If we calculate the first 600 terms of the series, it gives PI value accurate upto 3rd decimal place and error will be in 4th place.

Series of the Type:- sum of 1/ [a*a -(nr)(nr)]

i.e sum = 1/(a^2 - r^2 ) + 1/ ( a^2 - 4r^2 ) +1/ ( a^2 -9r^2 ) +..........
where a is the first term, r is a number and n is the total number of terms.