Added by Junbin on March 09, 2002 at 07:46:57:
For a G.P.a0, a1, ... , anwhere a0 * r = a1, a1 * r = a2, ...
thenSn = a0(1-r^n)/(1-r)