sum {k(k+1)(k+2)/6}r^k from k=1 to n