Typescript Sum Of Arithmetic Sequence