Re: Find two numbers a,b such us: a+b=5432 & LCM[a,b]=223020

*To*: mathgroup at smc.vnet.net*Subject*: [mg122158] Re: Find two numbers a,b such us: a+b=5432 & LCM[a,b]=223020*From*: János Löbb <janos at lobb.com>*Date*: Mon, 17 Oct 2011 08:09:17 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <201110162045.QAA19688@smc.vnet.net>

Well, a newbie approach would be something like this: lcm=223020 a+b=5432 let n such as n*a=lcm and let m such that m*b=lcm where n and m are Integers. Then a=lcm/n and b=lcm/m Then lcm/n + lcm/m = 5432 or 223020*(1/n +1/m) = 5432 Punch this into Matematica and use Reduce: In[1]:= Reduce[{223020(1/n + 1/m)==5432},{n,m}, Integers] Out[1]= (n==59&&m==135)||(n==135&&m==59) Writing these back to a and b, we get a= {3780,1652} and b={1652,3780} J=E1nos On Oct 16, 2011, at 4:45 PM, dimitris wrote: > This is taken from the recent book (2010): " Mathematica: A Problem- > Centered Approach" by R. Hazrat. > > "The sum of two positive integers is 5432 and their least common > multiple is > 223020. Find the numbers." > > A solution: > > Do[If[LCM[i, 5432 - i] == 223020, Print[i, " ", 5432 - i]], {i, 1, > 2718}] > 1652 3780 > > I wonder if we can solve the system of equations: > > a+b==5432&&LCM[a,b]==223020 > > using codes that contain built in functions like Reduce. > > I guess this is not a trivial one because the so much powerful Reduce > itself fails > > In[1]:= Reduce[{a + b == 5432, LCM[a, b] == 223020}, {a, b}, Integers] > > During evaluation of In[1]:= Reduce::nsmet:This system cannot be > solved with the methods available to Reduce. >> > > Out[1]= Reduce[{a + b == 5432, LCM[a, b] == 223020}, {a, b}, Integers] > > Any ideas? > > Dimitris >

**References**:**Find two numbers a,b such us: a+b=5432 & LCM[a,b]=223020***From:*dimitris <dimmechan@yahoo.com>