# Problem Solving

• Oct 19th 2008, 11:30 PM
not happy jan
Problem Solving
Please help. A farmer was asked how many cows he had on his property. He replied that he was unsure, but he knew that when he counted them by twos, threes, fours, fives or sixes, he always had one left over. The only way he could avoid this was to count by sevens; he then had none left over. What is the smallest number of cows the farmer could possibly have owned.
• Oct 19th 2008, 11:43 PM
treetheta
Err this is going of on a tangent because the number seems really large

since the only number that goes into 7 evenly is 49

7^2 = 49

and 49 doesn't apply to all the rules we further sq 49 since it will also be a number that goes evenly with 7 and no other number except 49

49^2 = 2401

and there is always 1 remainder for the set {2,6}
• Oct 19th 2008, 11:56 PM
terr13
Twos and threes are irrelevant, since if its divisible by 6, it implies it is divisible by both. Say the number is n.

n = 1 mod 6
n= 1 mod 5
n = 1 mod 4
n= 0 mod 7

this implies n =1 mod 30, and n=1+30q, so
1+30q=0 mod 7
2q=6 mod 7
q=3 mod 7
n=91 mod 210. The only thing left is n=1 mod4. You can just guess and test, and the answer is 301.
• Oct 20th 2008, 12:18 AM
not happy jan
I can see that 301 is the right answer, but I dont follow your pattern Terr13. Could you explain it any simpler for me. Thanks
• Oct 20th 2008, 12:30 PM
terr13
if n=1 mod7, that means it is off by a multiple of 7, so any answer of the form 1+7q would be correct, such as 8, -6, etc.

Since 6 and 5 are relatively prime, we know that the answer is of the form n =1 mod 30, since its remainder is one when divded by both 5 and 6. Next we combine this with n=0mod7.
n=1 mod 30 implies n =1 +30q. plug this n into the 2nd equation and solve for q.
1+30q=0 mod7.
30q = -1 mod 7
30q=6 mod 7
2q =6 mod 7
q = 3 mod 7. Plug in this q for n and you get 91 mod (7*30). 91 mod 210. That means any thing that has remainder of 1 when divided by 30 and is divisible by 7 has the form 91 + 210q. The last piece of information is then used, and we can guess and test, or count the remainders.
91 + 210q mod 4 = 3+2q mod 4, and we need something with remainder 1, so when q =1, 3+2 = 5 =1 mod4. When q is 1, n is 301, and we have our answer.