Sum of the First n Squares
This closed form gives . It appears in calculus (Riemann sums for ) and in statistics. Use it to sum square numbers quickly or to compute areas by Riemann sums.
LaTeX
\sum_{k=1}^{n}k^2=\frac{n(n+1)(2n+1)}{6}Variables
- number of terms
Example
Compute .
- .
Answer: .