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?
The problem is simplified by noting that while all three of (c,h,d) must be different primes, the equation will not work if all three are odd (left hand side will always be even, and right hand side always odd). So exactly one of the three is 2 (only even prime). It is not d, since 122 factors to 2*61. It is not c, else the left side is even, and the right odd. So, h/horses must be 2. So we are looking for a prime pair separated by 2. c * (c+2) must be greater than 120, and the very first try gives us 11*13, which gives us c=11 and hence d=23.