Re: LCM for TI-92


[Prev][Next][Index][Thread]

Re: LCM for TI-92



> IF the following is true:

> lcm(x,y,z) = lcm(lcm(x,y),z)

> [please prove that, I am too lazy]

This is indeed true. By unique factorization, each of x,y, and z can be
written as the product of primes to certain powers. The lcm of a group of
numbers is simply the product of the primes that occur with each one taken
to the highest power it occurs with.

Say x=p0^a0 * p1^a1 * p2^a2 . . .
y=p0^b0 * p1^b1 * p2^b2 . . .
z=p0^c0 * p1^c1 * p2^c2 . . .

Then lcm(x,y,z)=p0^max(a0,b0,c0)*p1^max(a1,b1,c1)...

But so is lcm(lcm(x,y),z); since lcm(x,y) will produce
p0^max(a0,b0)*p1^max(a1,b1)... and the lcm of that with z will have each
prime taken to either the power it had before or to the new power it occurs
with in z, depending on which is larger (so that we end up with each prime
taken to the max power which occurs!). Hence, the prime factorization of
lcm(lcm(x,y),z) and lcm(x,y,z) is the same, and the two numbers are equal.

- Paul Pollack
http://home1.gte.net/paulp/


References: