T=1+s+s^2+s^3+S^4+……S^N
ST=s+s^2+s^3+S^4+……S^N+S^N+1
T-ST=1-S^N+1
(1-S)T=1-S^(N+1)
T=[1-S^(N+1)]/(1-S)