Maths Olympiad Prep

Library / /16 of 23

Number theory Difficulty 6.0 AIME, harder Prove it Ireland

Let aa and bb be positive integers that are co-prime and let pp be a prime number. Prove that
gcd(ab,a2+pb2)={1if papif pa. \gcd(ab, a^2 + pb^2) = \begin{cases} 1 & \text{if } p \nmid a \\ p & \text{if } p \mid a. \end{cases}

Solution

Let d=gcd(ab,a2+pb2)d = \gcd(ab, a^2 + pb^2) and suppose d>1d > 1. Let qq be a prime factor of dd. Because a3=a(a2+pb2)pb(ab)a^3 = a(a^2 + pb^2) - pb(ab) we see that qa3q \mid a^3 and so qaq \mid a as well. As qa2+pb2q \mid a^2 + pb^2, this implies that qpb2q \mid pb^2. Because gcd(a,b)=1\gcd(a, b) = 1 this can only happen if q=pq = p.

So far we have shown that d>1d > 1 implies pap \mid a and d=pαd = p^\alpha for some α>0\alpha > 0. In particular, if pap \nmid a, then d=1d = 1. Obviously, if pap \mid a, then pdp \mid d. We continue to assume d>1d > 1 and need to show d=pd = p. Write a=p~a~a = \tilde{p}\tilde{a}, so that
d=gcd(p~a~b,p2a~2+pb2)=pgcd(a~b,pa~2+b2). d = \gcd(\tilde{p}\tilde{a}b, p^2\tilde{a}^2 + pb^2) = p \cdot \gcd(\tilde{a}b, p\tilde{a}^2 + b^2).
Because gcd(a~,b)=1\gcd(\tilde{a}, b) = 1, the argument at the start of this solution shows that gcd(a~b,pa~2+b2)>1\gcd(\tilde{a}b, p\tilde{a}^2 + b^2) > 1 would imply that pbp \mid b, which contradicts gcd(a,b)=1\gcd(a, b) = 1. Hence gcd(a~b,pa~2+b2)=1\gcd(\tilde{a}b, p\tilde{a}^2 + b^2) = 1 and so d=pd = p.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.