Exploring Geometric Progression

n=number of terms,a=first term,L=last term,r=common ratio,S=sum of n terms