7. [7] Suppose $a$ and $b$ be positive integers not exceeding 100 such that
$$
a b=\left(\frac{\operatorname{lcm}(a, b)}{\operatorname{gcd}(a, b)}\right)^{2} .
$$

Compute the largest possible value of $a+b$.
Answer: 78
Solution: For any prime $p$ and a positive integer $n$, let $\nu_{p}(n)$ be the largest nonnegative integer $k$ for which $p^{k}$ divides $n$. Taking $\nu_{p}$ on both sides of the given equation, we get
$$
\nu_{p}(a)+\nu_{p}(b)=2 \cdot\left|\nu_{p}(a)-\nu_{p}(b)\right|,
$$
which means $\frac{\nu_{p}(a)}{\nu_{p}(b)} \in\left\{3, \frac{1}{3}\right\}$ for all primes $p$. Using this with $a, b \leq 100$, we get that
- We must have $\left(\nu_{2}(a), \nu_{2}(b)\right) \in\{(0,0),(1,3),(3,1),(2,6),(6,2)\}$ because $a$ and $b$ cannot be divisible by $2^{7}$.
- We must have $\left(\nu_{3}(a), \nu_{3}(b)\right) \in\{(0,0),(1,3),(3,1)\}$ because $a$ and $b$ cannot be divisible by $3^{6}>100$.
- $a$ and $b$ cannot be divisible by any prime $p \geq 5$, because if not, then one of $a$ and $b$ must be divisible by $p^{3} \geq 5^{3}>100$.

If $\left(\nu_{2}(a), \nu_{2}(b)\right)=(2,6)$ (and similarly with $\left.(6,2)\right)$, then we must have $(a, b)=(4,64)$, so the sum is 68.

If $\left(\nu_{3}(a), \nu_{3}(b)\right)=(1,3)$ (and similarly with $(3,1)$ ), then we must have $\nu_{2}(b) \leq 1$ (otherwise, $b \geq$ $\left.2^{2} \cdot 3^{3}>100\right)$. Hence, the optimal pair is $(a, b)=\left(2^{3} \cdot 3^{1}, 2^{1} \cdot 3^{3}\right)=(24,54)$, so the sum is $24+54=78$.
If neither of the above happens, then $a+b \leq 2^{1}+2^{3} \leq 10$, which is clearly not optimal. Hence, the optimal pair is $(24,54)$, and the answer is 78 .