Captchar wrote:What is the total number of integers between 100 and 200 that are divisible by 3?
(A) 33
(B) 32
(C) 31
(D) 30
(E) 29
You can also solve this problem using the floor function, [200/3] - [100/3] = 66-33 = 33 (where [] denotes the floor function)
The biggest advantage here is that you need not bother about the boundary values or need not apply the inclusion exclusion principle.
PS:The floor function or the greatest integer function gives the largest integer less than or equal to the number. e.g. [11.9]=11, [-2.4]=-3, [3]=3
So essentially you can find the number of multiples of any number less than a particular number.
e.g. number of multiples of 7 upto 200 = [200/7] = 28
Let's solve another problem applying this function. Let's say we need to find how many numbers upto 400 are divisible by 3 and 5.
[400/3] + [400/5] - [400/15] = 133+80-26=187
Note that we found all the multiples of 3, all the multiples of 5 and substracted the overlapping multiples which are both the multiples of 3 and 5.
Another application of this function is to calculate the highest power of a prime number p in n!
[n/p]+[n/p^2]+[n/p^3]+[n/p^4]+... where [] denotes the floor function.
Let's aplly this to a problem.
Find the number of positive divisors of 15!.
The prime factors in 15! are 2,3,5,7,11, and 13.
Powers of 2 in 15! = [15/2]+[15/2^2]+[15/2^3]=7+3+1=11
Powers of 3 in 15! = [15/3]+[15/3^2]=5+1=6
Powers of 5 in 15! = [15/5]=3
Powers of 7 in 15! = [15/7]=2
Powers of 11 in 15! = [15/11]=1
Powers of 13 in 15! = [15/13]=1
Therefore 15!=(2^11)*(3^6)*(5^3)*(7^2)*11*13
Number of positive divisors = 12*7*4*3*2*2= 4032