Ask your own question, for FREE!
Mathematics 18 Online
Parth (parthkohli):

The number of multiples of \(3\) more than \(100\) but less than \(700\).

hartnn (hartnn):

floor(700/3)-floor(100/3)

Parth (parthkohli):

So I can just subtract \(100\) to get this expression: The number of multiples of \(3\) more than \(0\) but less than \(600\). So will \(\lfloor 600/3\rfloor\) work too?

hartnn (hartnn):

no, i don't think so...

hartnn (hartnn):

counter example : no. of integers greater than 21 but less than 24

hartnn (hartnn):

*multiples of 3

hartnn (hartnn):

actually answer = 0, if you do 24-21 , you get 1

hartnn (hartnn):

with floor(24/3)-floor(21/3) also you get 1 :P

hartnn (hartnn):

i think you should add 'more than or =' instead of just 'more than' for that formula to work.

Parth (parthkohli):

Okay :)

Parth (parthkohli):

Oh, I got why it does that =)

Parth (parthkohli):

I can just subtract \(1\) if the base case is a multiple of \(3\) right?

Parth (parthkohli):

(if I am using "more than").

hartnn (hartnn):

but for your original Q , you don't need to subtract 1 floor(700/3)-floor(100/3) is correct....

Parth (parthkohli):

Yes because the base case is not a multiple of \(3\). =)

hartnn (hartnn):

oh, you mean if numbers are multiples of 3.... yes, then subtract 1

Parth (parthkohli):

Yeah, the numbers that we start and end with. If only one is a multiple of \(3\), subtract \(1\). If both, \(2\). Gotcha!

hartnn (hartnn):

if both subtract 2 ??? see my counter example both---->but subtract 1 only.

hartnn (hartnn):

If only one/none is a multiple of 3, subtract 0. If both, 1.

Parth (parthkohli):

Oh yes

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!