Please help me. This problem is part of a captcha program and I cannot bypass it.
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 3209.
Thanks for any help.
$3209 = 3(1069) + 2 $ So we need to find the sum $S_1 = 3+6+9 + \cdots + 3207$
$3209 = 5(641) + 4$ and the sum $S_2 = 5 + 10 + 15 + \cdots 3205$
$3209 = 15(213) + 14$ and $S_3 = 15 + 30 + 45 + \cdots 3195$
The total sum would be $S = S_1 + S_2 - S_3$.
Since $15, 30, 45, \cdots$ are common with both $S_1 , S_2$ so it count twice hence we should subtract them once. The sum of arithmetic series equal to the sum of the first and the last term multiplied with the half number of the terms
$S_1 = \frac{1069}{2}(3 + 3207)$