Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Ask a tutor for free
Learning Math Online

Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help

III Millennium Olympiad

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Sites for parents

Education & Parenting

Manifesto  |  Bookstore  |  Contents  |  Amazon store  |  Term index  |  What changed?  |  Contact  |  Recommend
RSS Feed: Recent changes at CTK

gcd and the Fundamental Theorem of Arithmetic

According to the Fundamental Theorem of Arithmetic, every integer N has a unique representation in the form

(1) N = p1n1p2n2...pmnm ,

where all all pi's are prime and ni's are positive. Relaxing the latter we may write

(2) N = 2n23n3...pinpi...,

where the exponents npi are non-negative. If any is zero, pi does not actually divide N. The reverse is also true. Therefore, pi divides N iff npi> 0.

(2) is more convenient if we want to compare representations of two integers. Let

(3) M = 2m23m3...pimpi...,

As before, pi|M iff mpi> 0. If pi is a common factor for N and M then the largest power of pi that divides both is given by min(npi, mpi). Since gcd(N,M) is the largest common divisor of N and M and is divisible by any other common divisor of the two,

(4) gcd(N,M) = 2min(n2, m2)3min(n3,  m3)...pimin(npi,  mpi)...

Two numbers N and M are coprime iff min(npi, mpi) = 0 for all i. Since all the exponents are non-negative, the latter is equivalent to

(5) npimpi = 0 for all i.

This is handy in proving that if gcd(N,M) = 1 and gcd(N,K) = 1 then gcd(N,MK) = 1. Indeed, the combination of npimpi = 0 and npikpi = 0 is equivalent to a single assertion that npi(mpi+kpi) = 0 for non-negative mpi and kpi.

From (2) and (3) we also obtain a representation for the Least Common Multiple lcm(N,M):

(6) lcm(N,M) = 2max(n2, m2)3max(n3,  m3)...pimax(npi,  mpi)...

The fact that gcd(N,M) * lcm(N,M) = N * M is thus equivalent to n + m = min(n,m) + max(n,m).

References

  1. R.Graham, D.Knuth, O.Patashnik, Concrete Mathematics, 2nd edition, Addison-Wesley, 1994.

Copyright © 1996-2009 Alexander Bogomolny

34381675Page copy protected against web site content infringement by Copyscape

Search:
Keywords:

Google
Web CTK