Puzzles
Multiple sums
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
Show answer & extension
Hide answer & extension
The multiples of 3 less than 1000 are 3,6,9,...,999; the multiples of 5 are 5,10,15,...,995. Multiples of 15 (15,30,...,990) will appear in both lists so we are trying to find (3+6+9+...+999)+(5+10+15+...+995)-(15+30+...+990). This is:
$$\sum_{i=1}^{333}3i+\sum_{j=1}^{199}5j-\sum_{k=1}^{66}15k$$
$$=3\sum_{i=1}^{333}i+5\sum_{j=1}^{199}j-15\sum_{k=1}^{66}k$$
$$=3\times\frac{333\times334}{2}+5\times\frac{199\times200}{2}-15\times\frac{66\times67}{2}$$
$$=166833+99500-33165$$
$$=233168$$
Extension
Find the sum of all the multiples of 3 or 5 below \(n\).