zaro

What is the sum of the squares of n natural numbers?

Published in Mathematics 1 min read

The sum of the squares of the first n natural numbers is given by the formula: n(n+1)(2n+1) / 6

Explanation of the Formula

The formula n(n+1)(2n+1) / 6 provides a concise way to calculate the sum of the squares of the first n natural numbers. Here's a breakdown:

  • n: Represents the number of natural numbers you want to sum the squares of (e.g., if you want the sum of the squares of the first 5 natural numbers, n = 5).
  • n+1: Simply adds 1 to the value of n.
  • 2n+1: Multiplies n by 2 and then adds 1.
  • n(n+1)(2n+1): The product of n, (n+1), and (2n+1).
  • / 6: The entire product is then divided by 6.

Examples

Let's illustrate with a couple of examples:

Example 1: Sum of squares of the first 3 natural numbers (1, 2, 3)

  • n = 3
  • Sum = (3 (3+1) (2*3 + 1)) / 6
  • Sum = (3 4 7) / 6
  • Sum = 84 / 6
  • Sum = 14

So, 12 + 22 + 32 = 1 + 4 + 9 = 14

Example 2: Sum of squares of the first 5 natural numbers (1, 2, 3, 4, 5)

  • n = 5
  • Sum = (5 (5+1) (2*5 + 1)) / 6
  • Sum = (5 6 11) / 6
  • Sum = 330 / 6
  • Sum = 55

So, 12 + 22 + 32 + 42 + 52 = 1 + 4 + 9 + 16 + 25 = 55

Why This Formula is Useful

Instead of manually calculating the square of each number and then summing them, this formula provides a direct and efficient way to find the result, especially for large values of n. This is invaluable in various mathematical and computational contexts.