# Squared triangular number

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_{i=1}^n i^{2}$$ – nissim abehcera Aug 24 '19 at 22:08
• Hint: it's a cubic. – Peter Taylor Aug 24 '19 at 22:21
• oeis.org/A000330 – rogerl Aug 24 '19 at 22:33
• The general case is known as Faulhaber's formula – Ross Millikan Aug 24 '19 at 22:34
• @RossMillikan thanks for the info! – jackdh Aug 24 '19 at 22:39

$$\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