# Greatest Common Divisor of prime numbers

What is the greatest common divisor of $2^4\cdot3^4\cdot25\cdot7$ and $2\cdot12^2\cdot15$?

I know how to find the GCD of a problem like this, but I didn't know what to do since $12$ is not a prime number. Should I say $12^2 = 2^2\cdot2^2\cdot3^2$?

• Hint: $12^2 = (2^2*3)^2 = 2^4*3^2$ – AnalyticHarmony Sep 18 '17 at 2:22
• that's a start. $12^2 =2^2*2^2*3^2=2^4*3^2$. And $15=3*5$ so $12^2*15=2^4*3^2*3*5 = 2^4*3^3*5$. Basically the first step is to rewrite everything as its unique prime factorization. $2^4*3^4*25*7 = 2^4*3^4*5^2*7$ and $2*12^2*15 = 2*2^4*3^2*3*5=2^4*3^3*5$. Then... you know what to do. – fleablood Sep 18 '17 at 3:49

The first one equal to $2^4*3^4*5^2*7$

The second one equals to $2^5*3^3*5$

Therefore the GCD is $2^4*3^3*5=2160$

Yes, that is precisely what you should be doing.

In short, when you want to find the gcd of two numbers directly, you must first represent each one as a product of prime powers, before matching powers and primes.

So in our case, we can write: $$2^4 \times 3^4 \times \color{blue}{25} \times 7 = 2^4 \times 3^4 \times \color{blue}{5^2} \times 7 \\ 2 \times \color{red}{12^2} \times \color{green}{15} = 2 \times \color{red}{2^2 \times 2^2 \times 3^2} \times \color{green}{3 \times 5} = 2^5 \times 3^3 \times 5$$

where, I highlight by color the terms that are expanded on both the LHS and RHS.

Now, we are permitted to compare powers directly. This gives us the answer as $2^4 \times 3^3 \times 5$.

• Nicely explained and nice use of colors. The OP should note when you express a number and a product of prime powers, there will always be exactly one unique way to do it. So doing this will always be a failsafe that will work. – fleablood Sep 18 '17 at 3:54