I am trying to solve this question : find total numbers which are divisible by $a$ and $b$ and are less than $N$ are always $\lfloor N/LCM(a,b) \rfloor$, by intuition I first find all numbers which are divisible by $a$ and out of these numbers I find all numbers which are divisible by $b$, now say using this technique I get $x$ such numbers. How to prove that $x = \lfloor N/LCM(a,b) \rfloor$ ?
2026-03-29 12:58:59.1774789139
On
How to prove that total numbers which are divisible by $a$ and $b$ and are less than $N$ are always $\lfloor N/LCM(a,b) \rfloor$?
82 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
I found it's proof by intuition
Say when we find all the numbers which are divisible by a and are less than N, x1,x2,x3...xn. Now out of these numbers, we try to find out numbers which are also divisible by b. say x2 is the least number. divisible by b. Now next number which would be divisible by x2 would be x2+x2 ( because we need to repeat the same computation what we did to find x2) same amount of increment in numbers is required.(else that number would either won't be divisible by a or by b). This is intuition, formal answer is yet welcome
I presume we're talking about positive integers here. A number is divisible by both $a$ and $b$ if and only if it is divisible by the $\operatorname{LCM}(a,b)$. So your question boils down to finding how many numbers less than $N$ are divisible by a single number $M=\operatorname{LCM}(a,b)$.