On this page
Questions about the sum of products of natural numbers taken two at a time look scary because there are so many terms: 45 of them for n = 10. You never have to add them one by one. A single squaring trick turns the whole thing into two sums you already know.
What does sum of products taken two at a time mean?
Pick two different numbers from 1, 2, ..., n, multiply them, and add up every such product exactly once. For n = 4 the pairs are 1·2, 1·3, 1·4, 2·3, 2·4 and 3·4, so the sum is 2 + 3 + 4 + 6 + 8 + 12 = 35.
In algebra this quantity has a name. The second elementary symmetric polynomial is the sum of x_a x_b over all 1 ≤ a < b ≤ n (Wikipedia: elementary symmetric polynomial).
Why does it equal [(Σn)² − Σn²]/2?
Let S = 1 + 2 + ... + n. Squaring S means multiplying every number in one bracket by every number in the other, which gives n² products. Picture them as an n by n grid, where row i and column j hold i·j.
The diagonal cells (i = j) hold the squares, adding up to Σn².
Every other cell holds two different numbers. The pair {i, j} appears twice: as i·j above the diagonal and as j·i below it.
So S² = Σn² + 2P, where P is the sum we want. Rearranging gives P = [(Σn)² − Σn²]/2. This is the k = 2 case of Newton's identities, 2e₂ = e₁p₁ − p₂ (Wikipedia: Newton's identities). It is the same idea that gives the (a + b + c)² expansion, just with n terms instead of three.
The sum of the first n natural numbers is n(n + 1)/2 (Wikipedia: triangular number). The sum of the first n squares is n(n + 1)(2n + 1)/6 (Wikipedia: square pyramidal number). For the first, see how triangular numbers build the nth term of a series.
How do you check it for n = 10 by listing the terms?
First the formula. Σn = 55, so (Σn)² = 3025, and Σn² = 385, the tenth square pyramidal number (Wikipedia). So P = (3025 − 385)/2 = 2640/2 = 1320.
Now the brute-force check. Group the 45 products by the smaller number i, and pull i out as a common factor:
i = 1: 1 × (2 + 3 + ... + 10) = 1 × 54 = 54
i = 2: 2 × (3 + ... + 10) = 2 × 52 = 104
i = 3: 3 × (4 + ... + 10) = 3 × 49 = 147
i = 4: 4 × (5 + ... + 10) = 4 × 45 = 180
i = 5: 5 × (6 + ... + 10) = 5 × 40 = 200
i = 6: 6 × (7 + 8 + 9 + 10) = 6 × 34 = 204
i = 7: 7 × (8 + 9 + 10) = 7 × 27 = 189
i = 8: 8 × (9 + 10) = 8 × 19 = 152
i = 9: 9 × 10 = 90
The rows hold 9 + 8 + ... + 1 = 45 terms, and their totals add to 1320. The listing and the formula agree. The On-Line Encyclopedia of Integer Sequences, entry A000914 (sum of products of unordered pairs from {1..n+1}), lists the same 1320 for {1..10} (OEIS A000914).
Is there a closed formula in terms of n?
Yes. Substitute the two standard sums, take out n(n + 1)/24 and factor 3n² − n − 2 = (n − 1)(3n + 2). You get P = (n − 1)n(n + 1)(3n + 2)/24. For n = 10: 9 × 10 × 11 × 32/24 = 1320. For n = 4 it gives 35, matching the listing at the top.
In an exam, the [(Σn)² − Σn²]/2 route is easier to trust than a memorised formula, because you rebuild it from sums you already know. Similar algebra drives the sum of cubes formula.
What mistakes should you watch for?
Forgetting the 1/2. Without it you count each pair twice: 2640 for n = 10.
Including the squares. If the question says i ≤ j, use [(Σn)² + Σn²]/2, which is 1705 for n = 10.
Mixing up (Σn)² = 3025 and Σn² = 385.
Thinking it only works for 1 to n. The grid argument works for any list, such as 1, 3, 5, 7.
Try one yourself: for n = 5, (15² − 55)/2 = 85. Then list the ten products to confirm it.
If you keep dropping the half, work through similar problems in the Fermi Problem Library, where the step-by-step solver explains the reasoning rather than printing an answer. If symmetric sums still feel shaky, the Fermi Concept Library has a lesson for each concept in mathematics, along with its place in the map.



