Ask your own question, for FREE!
Mathematics 7 Online
OpenStudy (loser66):

Here it is 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.

OpenStudy (loser66):

@dan815

hartnn (hartnn):

sum of multiples of 3 + sum of multiples of 5 - sum of multiples of 15

OpenStudy (dan815):

lol

hartnn (hartnn):

each of them is an arithmetic series

OpenStudy (dan815):

i did this already

OpenStudy (dan815):

u add the sums of 3 and sums of 5 and subtract the sums of 15

OpenStudy (loser66):

@hartnn dan gave me a link to solve math problem and I failed at the first question (this one) he laughed at me, hehehe

OpenStudy (dan815):

there are 333 terms that 3 can produce below 1000 and there are 199 terms 5 can produve below 1000 and there are 1000/15 -1 terms produced by 15

OpenStudy (dan815):

i can show u my code but its a little uugglaayy

OpenStudy (loser66):

how can you know there are 333 terms of 3?

hartnn (hartnn):

1000/3

hartnn (hartnn):

333*3=999 is the last term

hartnn (hartnn):

1000/5 =200 1000 is the lst term and total 200 terms

OpenStudy (loser66):

oooh, there is a method !!!

hartnn (hartnn):

*below* so 995 last term and 199 terms

OpenStudy (dan815):

hartn come join us!! on our programming journey

hartnn (hartnn):

thre's always a method xD

hartnn (hartnn):

i'm doing enough programming for y work. :P no more programming while i enjoy my hobby :)

OpenStudy (loser66):

so, it is 330 + 199 -5 ??

hartnn (hartnn):

whats that ?

OpenStudy (loser66):

oh 333 +190-5

hartnn (hartnn):

you're counting no. of terms? why ??

OpenStudy (loser66):

you said so

hartnn (hartnn):

take each series as separate arithmetic series

hartnn (hartnn):

series 1 3+6+9+..999 a1 = 3, d = 3, n= 333 sum =...

OpenStudy (dan815):

y=[] x=[] for i in range(334): a=3*i y.append(a) for i in range(200): b=5*i x.append(b) for i in range(67): x[3*i]=0 ans=sum(x) print ans

hartnn (hartnn):

series 2 5+10+15+..995 a1= 5,d=5, n = 199 sum2 =...

OpenStudy (dan815):

paste that code on that site and click excecute

OpenStudy (dan815):

see if it works

OpenStudy (loser66):

yes, I got it, thanks @hartnn

OpenStudy (dan815):

hartnn do u know python

hartnn (hartnn):

did u get why do we do this ? sum of multiples of 3 + sum of multiples of 5 - sum of multiples of 15

OpenStudy (loser66):

yes, I got the idea. hartnn

hartnn (hartnn):

yes, i've learned python like a month ago, and i use it in my work

OpenStudy (dan815):

yha loser do u get that

OpenStudy (dan815):

you are adding that sum twice because once for 5 * k3 and 3*k5

OpenStudy (loser66):

why for 15 you have to -1 term?

OpenStudy (dan815):

are you using my code

OpenStudy (dan815):

download python its free!

OpenStudy (loser66):

15|1000= 66.6666 so, the last term is 975., still <1000, why you have to -1?

OpenStudy (dan815):

its the easiest language to do some quick alogorythms

OpenStudy (loser66):

I don't know python. dan. I use calculator

OpenStudy (dan815):

lol

OpenStudy (dan815):

o mg plz dont!

OpenStudy (dan815):

you will get so stuck! this site teaches you some neat math after you solve it will show you more efficient ways

OpenStudy (loser66):

why??? when I studiedcomputer, I tried to understand the way the computer works, I asked and my prof hid himself to me, hahahaha...,

OpenStudy (dan815):

hahaha

OpenStudy (dan815):

look at this question! okay

OpenStudy (loser66):

OK, I will try python, but now, explain me. why you -1 from 15

OpenStudy (dan815):

what u mean

OpenStudy (dan815):

download python so u can run my code and see

OpenStudy (loser66):

15|1000 -1 term

OpenStudy (dan815):

i use 66

OpenStudy (dan815):

15*66 = 990

OpenStudy (loser66):

yes, Sir

OpenStudy (dan815):

so x=[] for i in range(67): % this range 67 makes numbers go only to 67-1 = 66 a=15*i x.append(a) % keeps adding every multiply of 15 to the list x

OpenStudy (dan815):

another way is to just ssum as you get them

OpenStudy (dan815):

sum1=0 for i in range(67): sum1=sum1+15*i

OpenStudy (dan815):

sum1 will contain the addition of all the multiles of 15* 1 to 15*66

OpenStudy (dan815):

sum1=0 for i in range(200): sum1=sum1+5*i sum2=0 for i in range(334): sum1=sum1+3*i sum3=0 for i in range(67): sum1=sum1+15*i ans = sum1+sum2-sum3

OpenStudy (dan815):

this is a another complete CODE i just wrote up for u :) ENJOOOYy

OpenStudy (loser66):

got you, dan

OpenStudy (dan815):

sum1=0 for i in range(200): sum1=sum1+5*i sum2=0 for i in range(334): sum2=sum2+3*i sum3=0 for i in range(67): sum3=sum3+15*i ans = sum1+sum2-sum3

OpenStudy (dan815):

forgot to replace the numbers beside the sum :)

OpenStudy (dan815):

hey

OpenStudy (dan815):

do this question umm

OpenStudy (dan815):

lets derive the sum of 1^2+2^2+3^2....+100^2 with a formula

OpenStudy (loser66):

233168

OpenStudy (dan815):

no i want formula

OpenStudy (dan815):

1^2+2^2+...n^2 = ?

OpenStudy (dan815):

ohh u mean u solved the fisrt question ok

OpenStudy (dan815):

brb eating

OpenStudy (dan815):

this is answer for question 1 : 233168

OpenStudy (loser66):

me too. I go to "iit" something

OpenStudy (dan815):

look at question 7

OpenStudy (dan815):

no look at question 6

OpenStudy (dan815):

derive sum of square formula im eating

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!