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...
-
Friar Lawrence plays a significant role in Romeo and Juliet's fate and is responsible not only for secretly marrying the two lovers but ...
-
Suppose that the average daily food consumption $F$ of a herbivorous mammal with body weight $x$, where both $F$ and $x$ are measured in pou...
-
Pablo Neruda's "Ode to My Socks" is full of figurative language, including similes and metaphors. Similes are figurative compa...
-
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...
-
Resourceful: Phileas Fogg doesn't let unexpected obstacles deter him. For example, when the railroad tracks all of a sudden end in India...
-
Evaluate $\displaystyle \int x^2 \cos mx dx$ by using Integration by parts. If we let $u = x^2$ and $dv = \cos mx dx$, then $d...
-
Iago states in act 1, scene 1 that he is jealous Othello made Cassio his lieutenant. Iago believes he has had more battle experience and is ...
No comments:
Post a Comment