Is there any easier or algorithmic method to solve this problem?
There are two numbers, $n$ and $6$. The least common multiple of $n$ and $6$ is $24$. Find $n$.
The way I do this is by expressing $6$ and $24$ into their prime factorisations.
$6=2\cdot3$ and $24=2^3\cdot3$. By simply observing and do simple reasoning, we can see that $n$ can be either $8$ or $24$. Right?
I know that if we are given its $\operatorname{gcd}$, then we can use $n\times6=\operatorname{lcm}(n,6)\cdot \operatorname{gcd}(n,6)$. But we are not given its $\operatorname{gcd}$ here.
If we try to explain this to a student who just learned about $\operatorname{lcm}$, how can we explain it in a simplest manner? Thanks.