Find two integer numbers given the LCM and the difference between them I started a Computer Science degree this year and I have a subject called 'Discrete Mathematics' which this unit (divisibility) is annoying me a lot, because I can't find the key to solve the problems as like as other units and subjects. 
The problem that I can't solve is this:

Find two integer numbers 'a' and 'b' given that their difference is 1080 and their LCM is 3900

Thanks

In the search of a more elegant solution rather than brute force, we know that as $\text{lcm}(a,b)=2^2\cdot 3\cdot 5^2\cdot 13$ that if both $a$ and $b$ had a factor of $13$ that $a-b$ must also be divisible by $13$.  Similarly if both $a$ and $b$ had a factor of $5^2$ that $a-b$ must be divisible by $5^2$.
Since $a-b=1080$ is not divisible by $13$ nor divisible by $25$, we know that exactly one of the two is divisible by $13$ and that exactly one of the two is divisible by $25$.
Also, since $a-b=1080=2^3\cdot 3^3\cdot 5$, one can also reason that both $a$ and $b$ must be divisible by $2^2\cdot 3\cdot 5=120$.
(They must both be divisible by four because otherwise one will be divisible by four and the other is not, implying their difference would not have been divisible by four which is a contradiction.  similarly for the other factors.  In general, try proving that $\gcd(a-b,\text{lcm}(a,b))$ divides both $a$ and $b$)
This brings our candidate answers to either $|a|=2^2\cdot 3\cdot 5^2\cdot 13=3900$ and $|b|=2^2\cdot 3\cdot 5=120$ or $|a|=2^2\cdot 3\cdot 5\cdot 13=780$ and $|b|=2^2\cdot 3\cdot 5^2=300$
It is clear that since $|3900\pm 120|>3780> 1080$ that it could not be the first result.
The second result on the other hand does work with $780-(-300)=1080$, yielding $a=780$ and $b=-300$.  We already know that $\text{lcm}(780,-300)=3900$ by construction.
