How many natural number with which satisfies lcm(n,2009)+gcd(n,2009)=n+2009" alt="lcm(n,2009)+gcd(n,2009)=n+2009" /> ?
(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:
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
just go to the link below:
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.