The greatest common divisor of two integers is x + 5 and their least common multiple is x(x + 5) , where x is a positive integer. If one of the integers is 60, what is the smallest possible value of the other one?
a=1; b=1;d=GCD(a, 60) ;e=LCM(a, 60); if(d==b+5 and e==b*(b +5), goto5, goto6);printd,e, a, b; a++;if(a<500, goto2, 0);a=1;b++;if(b<500, goto2, discard=0;
GCD of [a, 60] ==x + 5
LCM of [a, 60]==x * [x + 5]
a ==100
x == 15
GCD[100, 60] ==20 ==(x + 5)
LCM[100, 60]==300==x * (x + 5)
I’d set x+5=y, so x=y−5 and so we know that y should be a divisor of 60 greater than 5. Hence we can only have:
y∈{6,10,12,15,20,30,60}
On the other hand, we need y(y−5) to be a multiple of 60. We can make a table:
y y−5 y(y−5)
6 1 6
10 5 50
12 7 84
15 10 150
20 15 300
30 25 750
60 55 3,300
and we see that only two cases are possible, namely y=20 or y=60.
Now that we know that, if N is the other number, we need:
60N=y^2(y−5)
For y=20 we get N=100
For y=60 we get N=3300
Since we need the smallest positive integers, we therfore have:
x ==15, and the other number=100
GCD(60, 100)= 20
LCM(60, 100)==300