Recently, I have found this problem:
Given three integer numbers $a,b,c$ such that $1\leq a,b,c\leq 30$ and the following relation holds: $$\gcd(a,b,c)\cdot \text{lcm}(a,b,c)=\sqrt{abc}$$ How many different tuples $(a,b,c)$ are there?
To solve this, I thought to write: $$\text{lcm}(a,b)\cdot c=\gcd(\text{lcm}(a,b),c)\cdot \text{lcm}(\text{lcm}(a,b),c)$$ And: $$\gcd(a,b)\cdot c=\gcd(\gcd(a,b),c)\cdot \text{lcm}(\gcd(a,b),c)$$ So, I have: $$\frac{ab\cdot c^2}{\gcd(\text{lcm}(a,b),c)\cdot \text{lcm}( (\gcd(a,b),c)}=\sqrt{abc}$$ But here I am stuck. Any idea of how to proceed?
Thank you.
(I'm ignoring the triples which contain $0$.)
I would take a different tack and think about the prime factorizations of $a, b,$ and $c$. Let
$$a = p_1^{a_1}\cdots p_k^{a_k}$$
$$b = p_1^{b_1}\cdots p_k^{b_k}$$
$$c = p_1^{c_1}\cdots p_k^{c_k}$$
be the prime factorizations, where some of the exponents might be zero (so we can use the same set of primes for each factorization. If you square both sides of your equation and plug these in you have
$$\prod_{i=1}^{k} p_i^{2\max\{a_i,b_i,c_i\} + 2\min\{a_i,b_i,c_i\} } = \prod_{i=1}^{k} p_i^{a_i+b_i+c_i}. $$
So for each $i$ you must have
$$2\max\{a_i,b_i,c_i\} + 2\min\{a_i,b_i,c_i\} = a_i+b_i+c_i.$$
At this point, WLOG, suppose $a_i \leq b_i \leq c_i.$ Then the last equation is
$$2 c_i + 2a_i = a_i+b_i+c_i.$$
Or
$$ c_i + a_i = b_i.$$
This can only be true if $a_i = 0$ and $c_i = b_i.$
So we have this principle: If a prime divides any of $a, b, c$ then it divides exactly two of them and to the same power. Try $a=5, b=10, c=2$. Yup, it works. Try $17, 17, 1$. Yup. Try $5, 6, 30.$ Yup.
So here's the plan: WLOG, assume $a$ is the smallest member of the triple, then let $a$ count from $1$ to $30.$
If $a=1$, it forces $b=c$ and all choices for $b$ work. So that's 30 solutions.
If $a=2$, exactly one of $b$ and $c$ is exactly divisible by $2$. Say $2\mid b$. Then any prime power that divides $c$ must divide $b$, so we have $b= 2c$, with $c$ odd. That gives us 7 more solutions as $c$ counts the odds from $3$ to $15.$ (We skip $c=1$ because it has to be at least as large as $a$.
If $a=3$, we, similarly, look at the triples $(3, 3c, c)$ where $3\leq c\leq 10$, and $3\nmid c$. We add $(3,12,4), (3, 15, 5), (3,21,7), (3, 24, 8), (3, 30,10).$
If $a=4$, then $4 \mid b$, say and $2\nmid c$ and any prime dividing $c$ must divide $b$, so again we add $(4,20,5), (4,28,7).$ Because $c$ must be odd and greater than $4$ and $b=4c\leq 30.$
If $a=5$, we look at triples $(5, 5c, c).$ Here, $c > 5$ but $5c\leq 30$. So the only triple has $c=6$. Add $(5, 30, 6)$ to the list.
If $a=6$, we have cases. If $6\mid b$ then $\gcd(6,c)=1$ and $c\geq 7$. The only possibilities for $c$ are the primes greater than $6$. Each of these would have to divide $b$ which makes $b$ too large. So no more solutions here.
If $2 \mid b$ and $3\mid c$ then $c$ must be odd and $b$ must not be divisible by $3$. Otherwise, $b$ and $c$ must share the same primes, so there is a number $m$ such that $b = 2m$ and $c=3m$ and $\gcd(6,m)=1$. Since $c\leq 30$, the only possibilites for $m$ are $5$ and $7$. Add $(6,10,15)$ and $(6,14,21)$ to the list.
If $a$ is prime power bigger than $6$, then the triple is $(a, ac, c)$, but $c\geq a$, so $ac \geq 49 >30.$ so no solutions. We have eliminated $a = 7,8,9, 11, 13, 16, 17, 19, 23, 25, 27, 29.$
If $a=2p$ with $p$ and odd prime-power greater than $4$ then we have the same cases as for $a=6$. Either the triple is $(2p, 2pn,n)$ with $n\geq 2p$ which makes $b\geq 4p^2$ but this is too large. So no further solutions. The other case has $(2p, 2n, pn).$ But here, $p$ and $n$ are both at least $5$ and $n$ has to be odd and different from $p$. So $np$ is at least $35$. No solutions here. We have elimnated $10, 14, 18, 22, 26.$
Similarly, if $a=4p$ with $p$ an odd prime-power greater than $4$ there are no solutions. Cross off $20,$ and $28$. If $a=8p$, same thing. Cross off $24$.
If $a= 3p$ with $p=5$ or $7$, then we have cases again. First we might have $(3p, 3pn, n)$ this forces $b$ to be too large. Second, we might have $(3p, 3n, pn)$. This forces $c$ to be too large. Cross off $15$ and $21$.
If $a=12$, then $b=4n$ and $c=3n$ for some integer $n$ less than $30/4$ and relatively prime to $12$. So $n=5$ or $7$ giving us two more solutions. $(12, 15, 20)$ and $(12, 21, 28)$.
All that's left if $a=30$, which forces $b=c=30$ which is not a solution.