All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Cows, horses and dogs (Posted on 2008-10-20) Difficulty: 2 of 5
I have cows, horses and dogs, a different prime number of each. If I multiply the number of cows (c) by the total of cows and horses (c+h), the product is 120 more than the number of dogs (d), that is: c*(c+h) = 120 + d.

How many of each do I have?

See The Solution Submitted by pcbouhid    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Agreed | Comment 5 of 13 |

Thanks, Rod. I noticed that my wording was not clear on that point.  I had just written a long reply, trying to respond to your post, but found that got lost when I thought I was submitting it(the usual fate) so I'll try again as a separate comment. I believe I was correct is saying that h must be 2, the only even prime, so I was considering (c,h) as a pair of prime addends, but of course c+2 would not always be a prime.  I have been chiding pcbouhid on clarity of specs, and he has obliged in this problem. 

I think we can agree 11 is the lowest possible value for c (can't have negative dogs, can we), and hence (11,13) would be the lowest assignments for (c+h) -- which gives 11*13 = 143 = 120 + 23 -- which satisfies the conditions.  I have not proved that is the only solution. Charlie uses a double loop to prove that up to the 10,000th prime, but a single loop, with h=2,  probably would suffice.  That prm(n) function is interesting -- wonder how it is implemented in that language -- a finite internal table, or a rather slow factoring and counting for each call? 


  Posted by ed bottemiller on 2008-10-20 16:38:48
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (24)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information