SOLUTION: Trying to help my child with homework and can't figure out the formula. Please help: There are N number of buttons in a sewing box. N is greater then 40. N is less then 80.

Algebra ->  Divisibility and Prime Numbers -> SOLUTION: Trying to help my child with homework and can't figure out the formula. Please help: There are N number of buttons in a sewing box. N is greater then 40. N is less then 80.       Log On


   



Question 363643: Trying to help my child with homework and can't figure out the formula. Please help:
There are N number of buttons in a sewing box.
N is greater then 40.
N is less then 80.
N is divisable by 5 with a remainder of 2.
N is divisable by 7 with a remainder of 4.
Solve for N.
We are able to find N by process of elimination (N = 67) but I need the formula to help my child with future similar problems. Please help!

Answer by Sphinx pinastri(17) About Me  (Show Source):
You can put this solution on YOUR website!
I'm not sure that a child will like a general method, but it is
rather useful in math competitions. Please review a chapter about
linear Diophantine equations in any math textbook.
N = 5a + 2 = 7b + 4
where a and b are some natural numbers. Let's solve this
Diophantine equation.
5a - 7b = 2
5(a - b) = 2(b + 1)
This can happen when
a - b = 2
b + 1 = 5
i.e.
a = 6
b = 4
N = 32
Addition of LCM(7,5)=35 won't change the remainders.
So the general solution is
N = 32 + 35*n where n is a natural number.
Now we need to solve an inequality:
40 < 32 + 35*n < 80
i.e.
n = 1
N = 67