# math

posted by .

Find the number of solutions to the equation 2x + 5y = 2005, where x and y are positive integers.

Thank u :)

• math -

this is an example of what is called a Diophantine equation.
There are several ways to solve these, I use a method involving continued fractions, but it is too messy to explain here.
Let's use a "common sense" method.

Consider the intercepts,
We have (0,401) and (1002.5,0) but neither of these would be allowed since you are looking for positive integers.
The closest point to the y-intercept that would work is
(1000,1)

Now the slope of the line is -2/5, which means that for every increase of 2 for a y, we need a decrease of 5 for the x.
so possible points would be
(995,3), (990,5), (985,7) etc. until we get close to the x-intercept
We could then have 1000/5 or 401 "jumps" to get to (5,399)

so the points from smallest x to largest x would be
(5,399), (10,397) ... (995,3), (1000,1)

so there are 401 points which are solutions, using only positive integers.