https://codeanddebug.in/blog/sum-of-first-n-terms/