1
$\begingroup$

Question: Count the number of numbers between 2 sets.

Given two sets $A=\{2,4\},B=\{16,32,96\}$, the numbers between sets $A$ and $B$ are the numbers which are multiples of all the numbers in A and divisors of all numbers in $B.$ These numbers are $4,8$ and $16$,so there are $3$ numbers.

Solution: Find lcm of $A,$ and gcd of $B$. Denote as $l$ and $r$ respectively. The number of divisors of $r/l$ is the answer. For the above example, $l=4$ and $r=16.$ $r/l = 4.$ number of divisors of $4 = 3.$ i.e. $1,2,4.$

My question: Why is the number of divisors of $r/l$ the answer?

  • 0
    For $d$ "between" $l$ and $r$, write $d = k\cdot l$. What can be said about $k$?2017-01-02
  • 0
    1<=k<=r/l, but how does that help?2017-01-02
  • 0
    You can say more. Since $d$ divides $r$, …?2017-01-02
  • 0
    but in the above example, the number d=12 ,k=3 does not work, since 12= 3*4 but 12 does not divide 162017-01-02
  • 0
    Yes, that's the point. Not all numbers $1 \leqslant k \leqslant r/l$ work, only …2017-01-02
  • 0
    It still does not seem immediately obvious, in the example, 1,2 and 4 work because they divide r/l while 3 does not. I am still having a bit of trouble understanding this. What is the significance of r/l2017-01-02
  • 0
    A number $d$ is between the two sets if a) it is a multiple of $l$, and b) it is a divisor of $r$. a) means there is an integer $k$ such that $d= k\cdot l$. b) means there is an integer $m$ such that $r=m\cdot d$. Inserting the former into the latter, we find $r = m\cdot (k\cdot l)$, or, after regrouping, $r = (m\cdot k)\cdot l$. Divide by $l$, we have $\frac{r}{l} = m\cdot k$, that is, $k$ must be a divisor of $\frac{r}{l}$ (which must be an integer for there to be any number between the two sets). Conversely, if $k$ is a divisor of $r/l$ (supposing that is an integer), $d = k\cdot l$ works.2017-01-02
  • 0
    Ahhh, I finally get it. Thanks for that explanation. Cheers mate!2017-01-03

1 Answers 1

0

expanding Daniel Fischer's comment, Assuming that you understood why lcm and gcd are being used, so the numbers between A and B are multiples of l and are divisors of r.

If l is not a divisor of r then there are no numbers between A and B (as multiples of l can't divide r if l can't divide r).

If l divides r consider r=k.l.The numbers between A and B are of form l.d (as they are multiples of l) and should divide r which implies

                       d divides k=r/l.

so no. of numbers between A and B(equal to no, of possible values for d ) = no of divisors of r/l.