# a and b are integers where gcd(a,b)=p which is a prime. find gcd(a^2,b^2).

Problem 5 (10 points): Let $a,b$ be integers such that $g.c.d.(a,b) = p$ where $p$ is prime. Find $g.c.d.(a^2,b^2)$.

(Original screenshot)

I've found that $g.c.d. (a^2,b^2) = p^2$ when using examples for $(a,b)$ like $(9,12)$, $(34,85)$, and $(14,21)$ whose gcd's are primes. I could put my answer down as $g.c.d. (a^2,b^2) = p^2$ and probably get the answer right but I would really like to find that through proofs rather than examples. Any help is appreciated.

-
By squaring a and b, you do not introduce any additional prime factors. – Tpofofn Feb 9 '14 at 3:33

More generally, let $(a,b)=p$ where $p$ is a positive integer and $\displaystyle \frac aA=\frac bB=p\implies (A,B)=1$
So, $\displaystyle(a^n,b^n)=(p^nA^n,p^nB^n)=p^n(A^n,B^n)$
As $A,B$ are coprime, so will be $A^n,B^n$
$\displaystyle\implies(a^n,b^n)=(a,b)^n$
What does $A,B$ and $A^n, B^n$ being coprime have to do with the assumption $(a^n,b^n)=(a,b)^n$? I understand everything else. – magnuspaajarvi Feb 9 '14 at 4:07
@magnuspaajarvi, We have $$(a^n,b^n)=p^n(A^n,B^n)=p^n=(a,b)^n$$ – lab bhattacharjee Feb 9 '14 at 4:17
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9171441793441772, "perplexity": 273.5680188244061}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461860126502.50/warc/CC-MAIN-20160428161526-00202-ip-10-239-7-51.ec2.internal.warc.gz"}