The LCM(40, 20) can be determined quite easily if we are familiar with what "least common multiple" means. The LCM(40, 20) = 40, since 40 x 1 = 40 AND 20 x 2 = 40. Since 1 and 2 are integers, this solution satisfies the definition of the LCM(40, 20).
However, it's rare that the answer will be so obvious, so here is an algorith to determine the LCM of any two numbers:
The fundamental theorem of arithemetic tells us that any integer greater than 1 can be expressed as a product of primes, each to some power. So all we have to do is find the prime factorization (or factor tree) of each number. I wll work through the above example;
Starting with 40, we divide by the lowest number possible (greater than 1) until we cannot divide anymore. Each divisor is a term in our factorization, and we continue the process each time using the quotient.
40/2 = 20 (2 is our first term, and we continue with (40/2)=20.)
20/2 = 10 (2 is our second term, and we continue with 10..
10/2 = 5 (2 is our next term....)
and 5 is prime so we can only divide by one...and we are done.
So what we figured out was;
40 = 2 x 2 x 2 x 5 = 23 x 51 .
Next we do the same with 20:
20/2 = 10;
10/2 = 5;
5 is prime, so:
20 = 2 x 2 x 5 = 22 x 51 .
Now all that's left to find the LCM is to combine all the terms we came up with, and choosing the largest power if a number happens to be in both factorization:
So, LCM(40, 20) = 23 x 51 = 8 x 5 = 40.
With this method you can compute the LCM of any two integers!
Hope it helps!