Sum of Squares

basic

1²+...+n²

Formula

n(n+1)(2n+1)/6