How many natural number with which satisfies lcm(n,2009)+gcd(n,2009)=n+2009" alt="lcm(n,2009)+gcd(n,2009)=n+2009" /> ?
(1) Above is a corrected version of the question in the thread.
(2) I'm suspicious of questions that involve the current year (2009). They often come from mathematical competitions for which competitors ought not to be seeking help. Can you assure us that this is not the case here?
maybe those ones:
1
7
41
49
287
2009
Solution (in Python):
And some more observations:Code:import fractions def lcm( a, b ): return ( a * b / fractions.gcd( a, b ) ) for n in range( 1, 2010 ): if lcm( n, 2009 ) + fractions.gcd( n, 2009 ) == n + 2009: print ( n )
n, lcm(n, 2009), gcd(n, 2009)
1, 2009, 1
7, 2009, 7
41, 2009, 41
49, 2009, 49
287, 2009, 287
2009, 2009, 2009
Closely related to this (above) thread is this reference:
http://www.mathhelpforum.com/math-he...mm-5-isnt.html
thanks, but i have re-posted it since i dont know how to delete this my post..
just go to the link below:
http://www.mathhelpforum.com/math-he...mm-5-isnt.html
yup, this problem comes from math contest in my country, but the contest has been over 4 days ago, so i didn't do anything wrong just ensure my answer
I admit 2009 also goes. Sorry, I'm very green at Python at the moment and didn't use the range() function properly. I've corrected my Python code.
I'm not very good at math especially in competition exercises, but I suggest you should recall indicators of integer divisibility rules (Divisibility rule - Wikipedia, the free encyclopedia).
Simply divide 2009 with 7 some times and then with something else, compose LCMs & GCDs and that seems to be almost all!
Also have a look at my 'observations' in post #3. Of course Python program is not the best solution but it allows to find a way to mathematical one. Basically when you have a deal with LCM & GCD divide into primes. Now I see, the only topic related to division and learned at school is Divisibility rules.