Say I have n=5 I would like to perform the following equation:
5^2 + 4^2 + 3^2 + 2^2 + 1^2 = 55
I know that a triangular number can be worked out with the following equation:
(n(n+1)/2)
However it is at this point where I've not been able to work out the required adjustments to suite this use case.
What would be the correct equation?
$$\sum_{k=1}^n k^2 = \frac{1}{6}n(n+1)(2n+1)$$ with n=5 :$$\frac{1}{6}*5*6*11=55$$ it is sometimes called number for quadratic pyramid. trula