Hello!
Suppose that the two numbers are both >=2 (if one of the numbers is 1, the problem is trivial). Then both have its unique decomposition into prime factors. If we find this decomposition, which is not simple for large numbers, then LCM must contain the maximum degrees of all prime factors from both numbers.
Consider an example. Let a = 126, b = 108. Then a = 2^1*3^2*7, b = 2^2*3^3. The maximum degrees are 2 for 2, 3 for 3 and 1 for 7. Hence LCM(a,b) = 2^2*3^3*7 =756.
Another method is to find the greatest common divisor (for example, using Euclidean algorithm) and use the fact that a*b = LCM(a,b)*GCD(a,b).
Wednesday, January 31, 2018
How do you find the least common multiple between two numbers?
Subscribe to:
Post Comments (Atom)
Why is the fact that the Americans are helping the Russians important?
In the late author Tom Clancy’s first novel, The Hunt for Red October, the assistance rendered to the Russians by the United States is impor...
-
There are a plethora of rules that Jonas and the other citizens must follow. Again, page numbers will vary given the edition of the book tha...
-
The poem contrasts the nighttime, imaginative world of a child with his daytime, prosaic world. In the first stanza, the child, on going to ...
-
The given two points of the exponential function are (2,24) and (3,144). To determine the exponential function y=ab^x plug-in the given x an...
-
Robinson Crusoe, written by Daniel Defoe, is a novel. A novel is a genre defined as a long imaginative work of literature written in prose. ...
-
Hello! This expression is already a sum of two numbers, sin(32) and sin(54). Probably you want or express it as a product, or as an expressi...
-
A tempest is a violent storm and considering that the first scene of the play takes place in such a storm, the title is quite fitting. It is...
-
Macbeth is reflecting on the Weird Sisters' prophecy and its astonishing accuracy. The witches were totally correct in predicting that M...
No comments:
Post a Comment