Find all positive integers $a$ such that: $lcm(120,a) = 360$ and $gcd(450,a)=90$
I started by factoring
$$450 = 2\times 3\times3\times5\times5$$
and
$$90 = 2 \times3\times3\times5$$
Since $gcd(450,a)=90$ than
$$a = 90m$$ where $m$ is not a multiple of $5$
On the other side:
$$lcm(120,a) = 360$$
Which means:
$$360 = \frac{120\cdot a}{gcd(120,a)}$$
Substituting $a$
$$360 = \frac{120\cdot 90m}{gcd(120,90m)}$$
$$gcd(120,90m) = \frac{120\cdot 90m}{360}$$
$$gcd(4,3m) = \frac{120\cdot 90m}{360\cdot 30}$$
$$gcd(4,3m) = m$$
So $$m|4$$
Which implies that $m \in \{1,2,4\}$
Finally $a \in \{90,180,360\}$
I know the result is right, because my book says so, but I only arrived at the solution by working backwards from the answer in the book. And my resolution does not seems very mathematical (I think I assumed things that I could not assume. I would be thankful if you could also point my mistakes). Can someone me a better way to solve this problem? My book has lots of problems involving variables and gcd and lcm. I am looking for a method or at least a logic to solve this kind of problem.
Best Answer
Since your answer is correct, I would assume the overall steps are also correct, but I can also look more closely if you want :)
Here's what I would've done to arrive at the solution:
These two constraints are strong enough to narrow down our candidates to $a \in \{90, 180, 360\}$. Now it suffices to check that they work, which you can do yourself :P