What is the formula to get sum of series
$$1+(1+x)+(1+x)^2+.... +(1+x)^n,$$
where $n$ is Integer and $x$ is Rational