Two brothers share a flock of x sheep. They take the sheep to the market and sell each sheep for $x. At the end of the day they put the money from the sales on the table to divide it equally. All money is in $10 bills, except for fewer than ten excess $1 bills. One at a time they take out $10 bills. The brother who draws first also draws last.
The second brother complains about getting one less $10 bill so the first brother offers him all the $1 bills. The second brother still received a total less than the first brother so he asks the first brother to write him a check to balance the things out.
How much was the check?
With the conditions as stated in the problem, the amount of remaining singles after all the ten dollar bills have been picked up is 6. An equation to solve the problem is x^2 = 10a + b, with the added condition that a is an odd number since the first brother gets an additional ten dollar bill. Running through the first ten squares, we find that only 2^2 = 16, and 4^2 = 36 display an odd number in the tens position. We know that checking the first ten squares is sufficient for if we add ten to any of the solutions so far: (x+10)^2 = x^2 + 20x + 100= 100+20x + 10a + b which again exhibits the same behavior in the tens and singles digits.
Therefore in all cases, b = 6 and the first brother has $4 more than the second brother. He squares accounts by writing a check for $2.