(x-1)S=\frac{x^{n+1}-x}{x-1}-n