For each positive integer $n$, let $d(n)$ be the number of positive integer divisors of $n$. Prove that for all pairs of positive integers $(a,b)$ we have that: \[ d(a)+d(b) \le d(\gcd(a,b))+d(\text{lcm}(a,b)) \]and determine all pairs of positive integers $(a,b)$ where we have equality case.
Problem
Source: Iberoamerican MO 2024 Day 1 P1
Tags: number theory, Divisors, GCD and LCM
21.09.2024 23:29
Consider the following diagram, $A$ represents the set of divisors of $a$, $B$ represents the set of divisors of $b$, $\gcd(a,b)$ denote the set of divisors common to $a,b$, and $lcm(a,b)$ denotes the divisors of $lcm(a,b)$. Evidently $d(a)+d(b)-d(\gcd(a,b)) = A \cup B \leq d(lcm(a,b))$ where equality holds iff there is no divisor of $lcm(a,b)$ so that it does not divide $a$ or $b$, or in other words, equality holds iff $a \mid b$ or $b \mid a$
Attachments:

22.09.2024 09:53
We have that $d(a)=\prod(e_i+1)$, $d(b)=\prod(f_i+1)$, and $d(gcd(a,b))+d(lcm(a,b))=\prod(min\{e_i, f_i\}+1)+\prod(max\{e_i,f_i\}+1)$, by the definition of LCM and GCD, given that $e_i$ and $f_i$ are the non-negative integer sequences that represent the powers of primes of a and b respectively. Note that if the number of terms in these two sequences is unequal, only $\prod(max\{e_i,f_i\}+1)$ increases, so proving that $\prod(e_i+1)+\prod(f_i+1) \leq \prod(min\{e_i, f_i\}+1)+\prod(max\{e_i,f_i\}+1)$ is sufficient. Now, we have that equality holds $\iff$ $e_i \leq f_i$ or $e_i \geq f_i \forall \hspace{0.1cm} i$(which is equivalent to $a|b$ or $b|a$). Also, the above inequality can directly be proved by rearrangement inequality applied on multiple sequences, as seen here: https://math.stackexchange.com/questions/109459/rearrangement-inequality-for-multiple-sequences.
23.09.2024 14:12
This problem was proposed by Cristhian González and myself (Santiago Rodriguez) both of us from Colombia. We both hope that you have fun while solving it.
23.09.2024 21:11
Nice one! Here is a one-liner: We can note that $d(a)d(b)=d(\text{gcd}(a,b))d(\text{lcm}(a,b))$ so (since for fixed product the sum becomes smaller the closer the terms are together) the problem is equivalent to $d(\text{gcd}(a,b)) \le d(a)$ which is trivial.
24.09.2024 04:01
If a,b are coprimes it's easy to see that $d(a) + d(b) \leq d(ab) + 1$ Wlog $a \leq b$ If $b = a*n$ for some positive integer n Then $d(a) + d(b) = d(a) + d(b)$ Equality satifies if $a|b$ or $b|a$ If $b \neq a*n$ and $gcd(a,b)>1$ Let $g = gcd(a,b)$ Then $lcm(a,b) = g * s $ for integer s with divisors from both a and b With this in mind, $d(a) + d(b) \leq d(g) + d(g*s) = d(g) [ 1 + d(s)]$ which again could've only hold inequality if s had divisors onl from b
25.09.2024 09:13
25.09.2024 10:06
godfjock wrote: With this in mind, $d(a) + d(b) \leq d(g) + d(g*s) = d(g) [ 1 + d(s)]$ I'm not sure you I understand the logic as for why this inequality is true (indeed, it is exactly what we need to prove). Also note that $d(g \cdot s)=d(g) \cdot d(s)$ is not necessarily true, as $g$ and $s$ are not necessarily coprime.
27.09.2024 11:55
By PIE we have $d(a)+d(b)-d(\gcd(a,b))$ is the number of positive integers that divide $a$ or $b$. But, any integer dividing $a$ or $b$ also divides $\text{lcm}(a,b)$. $\blacksquare$
30.09.2024 13:49
Observe that we have that the $d(a) + d(b) -d(\gcd(a,b))$ is a subset of $d(lcm(a,b))$ so the condition follows and for the equality we need that $lcm(a,b) \in \{a,b\}$ and that happens iff $a\mid b$ ot $b \mid a$