∑ n = 1 N n 2 = N ( N + 1 ) ( 2 N + 1 ) 6 {\displaystyle \sum _{n=1}^{N}n^{2}={\frac {N(N+1)(2N+1)}{6}}}