Find the sum of all multiples of 3 between 1 and 1000
Answers
Answered by
0
To find n use 1000/3 = 333 + remainder, 1000/5 = 200 + remainder,1000/15 = 66 + remainder and thensum multiples of 3: 3 ⋅ 333 ( 333 + 1 ) / 2 = 166833 . multiples of 5: 5 ⋅ 200 ( 200 + 1 ) / 2 = 100500 and subtractmultiples of 15 15 ⋅ 66 ( 66 + 1 ) / 2 = 33165 to get 234168.
Similar questions