Sum of squares of n natural numbers
Key idea: n³ - (n-1)³ = 3n² - 3n + 1
1³ - 0³ = 3⋅1² - 3⋅1 + 1
2³ - 1³ = 3⋅2² - 3⋅2 + 1
3³ - 2³ = 3⋅3² - 3⋅3 + 1
...
n³ - (n-1)³ = 3⋅n² - 3⋅n + 1
[Summing all these up]
n³ = 3(1² + 2² + 3² + ... + n²) - 3(1 + 2 + 3 + ... + n) + (1 + 1 + 1 + ... + 1)
Denote 1² + 2² + 3² + ... + n² by S.
n³ = 3S - 3 ½ n(n+1) + n
6S = 2n³ + 3n² + n
$S = \frac{n(n+1)(2n+1)}{6}$
Similarly, you can find the sum of cubes of n natural numbers.
No comments:
Post a Comment