Maths Olympiad Prep

Library / /1364 of 1394

, 2025

Number theory Difficulty 6.2 National Olympiad Prove it United States

Problem:
Determine, with proof, all possible values of gcd(a2+b2+c2,abc)\gcd (a^{2} + b^{2} + c^{2}, abc) across all triples of positive integers (a,b,c)(a, b, c).

Solution

Solution:
First, we show that no other nn work. If there does exist prime p3p \equiv 3 (mod 44) such that νp(n)=1\nu_{p}(n) = 1, then pabcp \mid abc; without loss of generality, assume pp divides aa. Then, p2a2p^{2} \mid a^{2} and pa2+b2+c2p \mid a^{2} + b^{2} + c^{2}, so pb2+c2p \mid b^{2} + c^{2}. Since pp is 33 modulo 44, 1-1 is not a quadratic residue modulo pp, so b2c2b^{2} \equiv -c^{2} (mod pp) only has the trivial solution (b,c)=0(b, c) = 0. Therefore pbp \mid b and pcp \mid c, so p2np^{2} \mid n. This contradicts νp(n)=1\nu_{p}(n) = 1, so no solutions outside of the claimed solution set exist.

Now, we give the construction. Let nn be in the claimed solution set. We proceed in two steps.

Step 1 (Local step). For each prime pp dividing nn, we will construct a,ba, b, and cc modulo pνp(n)+1p^{\nu_{p}(n) + 1} such that νp(gcd(a2+b2+c2,abc))=νp(n)\nu_{p}(\gcd (a^{2} + b^{2} + c^{2}, abc)) = \nu_{p}(n).

We have a couple cases.
- If νp(n)=2k\nu_{p}(n) = 2k for some positive integer kk, pick a=pka = p^{k}, b=pkb = p^{k}, and c=pk+1c = p^{k + 1} for p2p \neq 2 and pick a=b=c=pka = b = c = p^{k} for p=2p = 2.
- If p≢3p \not\equiv 3 (mod 44) and νp(n)=2k+1\nu_{p}(n) = 2k + 1 for some nonnegative integer kk, then by Fermat's Christmas theorem, there are positive integers xx and yy for which x2+y2=px^{2} + y^{2} = p. Then pick a=xpka = x p^{k}, b=ypkb = y p^{k}, and c=pk+1c = p^{k + 1}.
- If p3p \equiv 3 (mod 44) and νp(n)=2k+1\nu_{p}(n) = 2k + 1 for some nonnegative integer kk, then k1k \geq 1 by assumption. We let xx and yy be positive integers for which νp(x2+y2+1)=1\nu_{p}(x^{2} + y^{2} + 1) = 1. (This is fairly standard. To briefly recall the proof, note that xx and yy satisfying x2+1y2x^{2} + 1 \equiv -y^{2} (mod pp) exist because some quadratic residue must be adjacent to a nonquadratic residue, and forcing x2+1≢y2x^{2} + 1 \not\equiv -y^{2} (mod p2p^{2}) can be done by adding appropriate multiples of pp to xx or yy.) Then, pick a=xpka = x p^{k}, b=ypkb = y p^{k}, and c=pkc = p^{k}.

Step 2 (Global step). Given solutions (ap,bp,cp)(a_{p}, b_{p}, c_{p}) modulo pνp(n)+1p^{\nu_{p}(n) + 1} for each prime pnp \mid n, we construct a working solution (a,b,c)(a, b, c) over positive integers.

By Chinese Remainder Theorem, we can pick positive integers a,ba, b, and cc such that for all prime pnp \mid n, (a,b,c)(ap,bp,cp)(modpνp(n)+1)(a, b, c) \equiv (a_{p}, b_{p}, c_{p}) \pmod {p^{\nu_{p}(n) + 1}}. Now, we need to modify this construction to ensure that no other primes divide gcd(a2+b2+c2,abc)\gcd (a^{2} + b^{2} + c^{2}, abc).

For every prime pcp \mid c with pnp \nmid n, we modify aa and bb (by adding additional congruence relations) so that pp does not divide a2+b2a^{2} + b^{2}. Then, pp does not divide gcd(a2+b2+c2,abc)\gcd (a^{2} + b^{2} + c^{2}, abc) for any prime pp such that pcp \mid c and pnp \nmid n. Let
N=pcnpνp(n)+1,N = \prod_{p \mid c n} p^{\nu_{p}(n) + 1},
S={primes p such that pab but pcn},S = \{\text{primes } p \text{ such that } p \mid ab \text{ but } p \nmid c n\},
P=pSpφ(N)1(modN).P = \prod_{p \in S} p^{\varphi (N)} \equiv 1 \pmod {N}.
In particular, we have only fixed residues of a,b,ca, b, c modulo NN at this point. Now, let a1=aPa_{1} = a P and b1=bPb_{1} = b P. This keeps all of our mod NN conditions. We now claim that (a1,b1,c)(a_{1}, b_{1}, c) works. To prove this, fix a prime pp, and note that

if pp divides cnc n, then since aaa' \equiv a (mod NN) and bbb' \equiv b (mod NN), we have νp(gcd(a12+b12+c2,a1b1c))=νp(n)\nu_{p}(\gcd (a_{1}^{2} + b_{1}^{2} + c^{2}, a_{1} b_{1} c)) = \nu_{p}(n) from our construction of (a,b,c)(a, b, c).

if pSp \in S, then we note that pp divides a12+b12a_{1}^{2} + b_{1}^{2}, but not c2c^{2}, so pp does not divide a12+b12+c2a_{1}^{2} + b_{1}^{2} + c^{2}.

if pSp \notin S and pcnp \nmid c n, then pp does not divide a1b1ca_{1} b_{1} c.

This concludes the proof.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.