Question: What is the largest possible value of $\gcd(a,b)$ if the sum of two positive integers $a$ and $b$ is $2024$ and both are even?

["Title: Maximize $\gcd(a,b)$: The Largest Possible Value When $a + b = 2024$ and Both Are Even", "When two positive even integers $a$ and $b$ sum to $2024$, understanding the largest possible value of $\gcd(a,b)$ unlocks deeper insight into number theory and practical problem solving. This article explores how to determine the maximum possible $\gcd(a,b)$ under the given constraints.", "---", "### Understanding the Problem", "We are given:\n- $a + b = 2024$,\n- $a$ and $b$ are both even positive integers.", "We seek the maximum value of $\gcd(a,b)$ across all such pairs.", "Since $a$ and $b$ are even, both divisible by $2$, we know $\gcd(a,b)$ must be at least $2$. But can it be much larger?", "---", "### Use of GCD Properties", "Let $d = \gcd(a,b)$. Then $d \mid a$ and $d \mid b$, so $d$ divides their sum:\n$$\nd \mid (a + b) = 2024\n$$\nThus, $d$ must be a divisor of $2024$.", "Moreover, since $a$ and $b$ are both even, $a = 2a'$, $b = 2b'$ with $a', b'$ positive integers. Then:\n$$\na + b = 2a' + 2b' = 2(a' + b') = 2024 \Rightarrow a' + b' = 1012\n$$", "Now define:\n$$\na = d \cdot m,\quad b = d \cdot n \quad \ ext{with } \gcd(m,n) = 1\n$$\nThen:\n$$\na + b = d(m + n) = 2024 \Rightarrow m + n = \frac{2024}{d}\n$$", "Also, since $a = d \cdot m$ is even, and $d$ divides $2024$, we analyze when $dm$ and $dn$ are even.", "Since both $a$ and $b$ are even, $dm$ and $dn$ must both be even. This implies:\n- If $d$ is odd, then $m$ and $n$ must be even (so their product with $d$ remains even).\n- If $d$ is even, then $m$ and $n$ can be odd or even — as long as at least one is even, $dm$ or $dn$ is even. But since both $dm$ and $dn$ must be even, and $d$ is even, it suffices that $\min(m,n)$ is not all odd — actually, since $d$ is divisible by 2, $m + n = 2024/d$ must allow $dm$, $dn$ even, so $m$ and $n$ don’t both be odd.", "But we are maximizing $d$, so let’s focus on the largest divisors $d$ of $2024$ such that there exist positive integers $m, n$ with:\n- $m + n = 2024/d$,\n- $\gcd(m,n) = 1$ (because $\gcd(a,b) = d \cdot \gcd(m,n)$),\n- and both $dm$, $dn$ even.", "Our goal: maximize $d$ such that such $m, n$ exist and both $a = dm$, $b = dn$ are even.", "---", "### Step 1: Factor 2024", "We factor $2024$:\n$$\n2024 = 2^3 \ imes 11 \ imes 23\n$$\nSo all divisors of $2024$ are of the form $2^a \cdot 11^b \cdot 23^c$ with $0 \leq a \leq 3$, $0 \leq b \leq 1$, $0 \leq c \leq 1$.", "We want the largest $d \mid 2024$ such that $m + n = 2024/d$, and there exist coprime positive integers $m, n$ with $m+n = S = 2024/d$, and $dm$, $dn$ both even.", "---", "### Step 2: Condition for Evenness of $a$ and $b$", "Since $a = dm$, $b = dn$ must be even, and $d$ divides $2024 = 8 \cdot 253$, let’s analyze parity.", "Let $d = 2^k \cdot \cdots$. Then $dm$ is even iff $m$ is even (unless $d$ contributes at least one factor of 2 — but even $d$ can make $dm$ even even if $m$ is odd, as long as $d$ is even).", "But to guarantee both $dm$ and $dn$ are even, we need at least one of $m$ or $n$ even. Since $m + n = S = 2024/d$, both odd would imply $S$ even, but $S$ cannot be even and sum of two odds — wait: sum of two odds is even — so it’s possible.", "But $dm$ and $dn$ both even ⇒ each $dm$, $dn$ divisible by 2 ⇒ since $d$ is fixed, if $d$ is even (i.e., $k \geq 1$), then even times any integer is even ⇒ $dm$ and $dn$ are automatically even if $d$ is even.", "Only issue arises when $d$ is odd: then $m$ and $n$ must both be even (since $d$ has no factor of 2, $m,n$ must supply all factors of 2).", "So:\n- If $d$ is even: $dm$, $dn$ are even regardless of $m,n$ → condition satisfied.\n- If $d$ is odd: then $m$ and $n$ must be even, so $m = 2m'$, $n = 2n'$, $m'+n' = S/2 = 1012/d$", "Thus, odd $d$ limits us to cases where $S = 2024/d$ is even and $m',n'$ positive integers summing to $1012/d$, with $\gcd(m,n) = \gcd(2m', 2n') = 2\gcd(m',n')$, and final $\gcd(a,b) = d \cdot \gcd(m,n) = d \cdot 2\gcd(m',n')$. But we are constrained: $\gcd(a,b) = d$ only if $\gcd(m,n)=1$ — because $a = d m$, $b = d n$, so $\gcd(a,b) = d \cdot \gcd(m,n)$.", "Therefore:\n- If $d$ is odd → $\gcd(a,b) = d \cdot \gcd(m,n) \leq d \cdot \gcd(m',n')$ — but $\gcd(m',n')$ could be small.\n- But we want to maximize $\gcd(a,b)$, and odd $d$ only gives $\gcd(a,b) = d \cdot \gcd(m,n)$, and $d$ itself smaller than even divisors likely.", "So best chance is when $d$ is even — then $\gcd(a,b) = d \cdot \gcd(m,n)$, and $m,n$ coprime.", "But also, we require $m + n = 2024/d$, and $m,n$ positive integers, and if $d$ is even, we only require $m,n$ such that $dm$, $dn$ even — which is automatic.", "Wait: actually, if $d$ is even, $dm$ is always even, so no restriction on $m,n$ being even or odd — they can be any integers.", "But we need $m + n = S = 2024/d$, and $\gcd(m,n) = 1$ (since $\gcd(a,b) = d \gcd(m,n)$, and we want this to be large — so maximizing $d \gcd(m,n)$).", "But since $\gcd(m,n) = 1$, then $\gcd(a,b) = d$, provided $d$ divides $2024$ and $m+n = 2024/d$.", "Wait — correction: if $\gcd(m,n) = 1$, then $\gcd(a,b) = d \cdot \gcd(m,n) = d \cdot 1 = d$, only if $d$ is unchanged — yes! Because $a = d m$, $b = d n$, and $\gcd(m,n) = 1$, so $\gcd(a,b) = d$.", "So in fact:\n$$\n\gcd(a,b) = d \cdot \gcd(m,n) = d \cdot 1 = d\n\quad \ ext{when } \gcd(m,n) = 1\n$$", "But only if $d$ is even — then $a$ and $b$ are even, regardless.", "So to maximize $\gcd(a,b) = d$, subject to $m + n = 2024/d$, $m,n$ positive integers, $\gcd(m,n)=1$, and both $a = d m$, $b = d n$ even.", "But if $d$ is even, no issue.", "The only constraint is: can we write $S = 2024/d$ as sum of two coprime positive integers $m,n$?", "Yes — in fact, any integer $S \geq 2$ can be written as sum of two coprime integers: for example, $m = 1$, $n = S - 1$; then $\gcd(1, S-1) = 1$.", "So for any divisor $d$ of $2024$ with $d \leq 1012$ (since $m,n \geq 1 \Rightarrow m+n \geq 2$), we can find coprime $m,n$ summing to $S = 2024/d$.", "But we also require that $a = d m$ and $b = d n$ are even.", "So two cases:", "---", "### Case 1: $d$ even → $a = d m$, $b = d n$ are automatically even → condition satisfied.", "Example: $d = 1012$, then $S = 2$, so $m = 1$, $n = 1$, $\gcd(1,1) = 1$ → valid. Then $a = 1012 \cdot 1 = 1012$, $b = 1012 \cdot 1 = 1012$, both even, sum $2024$, $\gcd = 1012$.", "Wait — so $\gcd(a,b) = 1012$? But earlier logic said $d = 1012$, and $m=1$, $n=1$, $\gcd(m,n)=1$, so $\gcd(a,b) = d \cdot \gcd(m,n) = 1012 \cdot 1 = 1012$. Yes.", "Is this valid? $a = 1012$, $b = 1012$, both even, sum $2024$, $\gcd = 1012$.", "Can we go higher?", "Try $d = 2024$: then $S = 1$, but $m+n=1$, $m,n \geq 1$ → only possibility $m=1,n=0$ or $m=0,n=1$, but $m,n$ must be positive integers → invalid. So $d = 2024$ not possible.", "Try $d = 1512$? But $1512 <br/>\nmid 2024$? Check: $2024 \div 1512 \approx 1.34$, not integer. Only divisors.", "So maximum $d$ must divide $2024$.", "Best even divisor of $2024$ under $2024$?", "List large divisors of $2024 = 2^3 \cdot 11 \cdot 23 = 8 \cdot 253$", "Divisors:\n- $2024$\n- $1012 = 2^2 \cdot 11 \cdot 23$\n- $506 = 2 \cdot 11 \cdot 23 = 506$\n- $264? $ Wait: $2024 / 8 = 253$, $2024 / 4 = 506$, $2024 / 2 = 1012$, $2024 / 1 = 2024$", "So divisors in descending order:\n$2024$, $1012$, $506$, $253$, $184? $ $11 \cdot 23 = 253$, $8 \cdot 11 = 88$, $8 \cdot 23 = 184$, $2 \cdot 11 \cdot 23 = 506$, $2^3 \cdot 11 = 88$, $2^3 \cdot 23 = 184$, $2^2 \cdot 11 \cdot 23 = 1012$, $2 \cdot 11 \cdot 23 = 506$, $2^3 \cdot 11 \cdot 23 = 2024$", "So largest divisor less than $2024$ is $1012$.", "We already have a valid pair: $a = 1012$, $b = 1012$, both even, sum $2024$, $\gcd = 1012$.", "Are they both even? Yes. Is $\gcd = 1012$? Yes.", "Can we get higher? Next is $506$ — smaller.", "But is there a $d > 1012$ that divides $2024$? $2024$ itself: $d=2024$, $S = 1$, $m+n=1$, impossible with positive integers.", "So $1012$ is largest possible even divisor with $S = 2 \geq 2$, allowable.", "And we have a valid construction: $m = 1$, $n = 1$, $\gcd(1,1)=1$, $a = 1012 \cdot 1 = 1012$, $b = 1012 \cdot 1 = 1012$, both even, sum $2024$, $\gcd = 1012$.", "Thus, the maximum possible $\gcd(a,b)$ is $1012$.", "But wait — earlier we assumed $d$ even ensures $a,b$ even — true. But is there a case where $d$ is odd and $\gcd(a,b) > 1012$?", "Try: odd $d$, so $S = 2024/d$ must be even (since $2024$ even, $d$ odd), so $m + n = \ ext{even}$.", "Factor $S/2$: let $S = 2T$, $T = 1012/d$, so $dT = 1012$.", "We need $m + n = 2T$, $\gcd(m,n) = 1$, $m,n \geq 1$, and $a = d m$, $b = d n$ even.", "Since $d$ odd, $a$ even iff $m$ even; $b$ even iff $n$ even. So we need both $m$ and $n$ even to make both $a,b$ even.", "But $m + n = 2T$, and both even → sum is even, OK.", "But $m$ and $n$ even → $m = 2m'$, $n"]









