# Math Help - this is........ uhmmm...

1. ## this is........ uhmmm...

How many natural number $n$ with $n\leq2009$ which satisfies $lcm(n,2009)+gcd(n,2009)=n+2009" alt="lcm(n,2009)+gcd(n,2009)=n+2009" /> ?

2. Originally Posted by GTK X Hunter
How many natural numbers $n$ with $n\leq2009$ satisfy $\text{lcm}(n,2009)+\text{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?

3. maybe those ones:
1
7
41
49
287
2009

Solution (in Python):
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 )
And some more observations:

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

4. I'm very bad at math but you probably should divide by 7 ( 2+0+0+9 = 2 + 9 = 7 , 7 mod 7 = 0; 7^2 = 49, and so on)

5. Originally Posted by GTK X Hunter
How many natural number $n$ with $n\leq2009$ which satisfies $lcm(n,2009)+gcd(n,2009)=n+2009$ ?
Closely related to this (above) thread is this reference:

http://www.mathhelpforum.com/math-he...mm-5-isnt.html

6. Originally Posted by Opalg
(1) Above is a corrected version of the question in the thread.
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

Originally Posted by Opalg
(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?
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

7. @ excellents:
they are 1, 7, 41, 49, 287, 2009
nice try^_^

8. Originally Posted by aidan
Closely related to this (above) thread is this reference:

http://www.mathhelpforum.com/math-he...mm-5-isnt.html
thanks aidan... (your name remind me to aidan, rachel's son in the film titled "the ring", hehehe579xx... )

9. 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.