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?
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?
Copyright © 2021 JogjaFile Inc.
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}$$
Thus:
$$\sum_{k=1}^{3075} k^2 = 1^2+2^2+\dots+3074^2+3075^2={3075(3076)(6151)\over 6}$$