X Tutup
Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Multiples of 3 and 5


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$.


Let's see by taking an example , suppose for $n=3$ We would have to add: $3 + 6 + 9 + 12 + .....+ 999 = 3\times (1 + 2 + 3 + 4 + 5 + ...+333)$

For $n= 5$ we have: $5 + 10 + 15 + ....+ 995 = 5 \times (1 + 2 + 3+...+199)$

Now we see that $199 = 995/5$ but also $999/5$ rounded down to the nearest integer.

Now if we note that $1+ 2 + 3 + ...+ p = 1/2 \times p \times (p+1)$


Answer : $233168$

X Tutup