# Sum of the first $3075$ squares

I am attempting to solve the following:

$$3075^2 + 3074^2 + 3073^2 +\dotsb+ 1^2$$

Does anyone have any advice for exactly how I could plug this into R or Python?

• Do you mean $\sum_{k=1}^{3075} k^2$? – Lord Shark the Unknown Mar 15 '18 at 1:47
• The information you have give is not the sum of $(3075!)^2$. – Mathew Mahindaratne Mar 15 '18 at 1:55

Remember the formula for the sum of the first $k$ squares:
$$\sum_{k=1}^n k^2 = 1^2+2^2+\dots+(n-1)^2+n^2={n(n+1)(2n+1)\over 6}$$
$$\sum_{k=1}^{3075} k^2 = 1^2+2^2+\dots+3074^2+3075^2={3075(3076)(6151)\over 6}$$