S_n=\frac{3^{n+1}-2n-3}{n+1}