I was recently looking at a puzzle in Martin Gardner's book:
Two brothers sell their heard of sheep, and receive the same number of dollars per sheep, as there were sheep in the heard. They receive the money in $\$10$ bills, and then the remainder is made up of silver dollars.
They split the money by alternating taking \$10 bills, and then the last takes all the silver dollars. The older brother goes first, and takes the first bill, and the last bill - so the younger brother complains that he receives less.
The older brother agrees to write him a cheque to cover the difference. How much is the cheque for?
Now, to get to the solution - as the book says - you know that the total amount of money was $\$n^2$, and that $n^2 - n^2 \mod 10$ is odd. Looking at the squares, you have $1,4,9,16,25,36,49,64,81,100,121,144,\ldots$ . And so the number of sheep has to have been either 4, or 6, and so the cheque must be for $\$2$. But how do I show that all the squares above 6 have an even number of tens?
Pointed out below, were $14^2, 16^2, 24^2, 26^2, \ldots$ - all the squares of numbers ending in 4 or 6. Is there a relationship with these numbers?
All integers are of the form $10n\pm k$, where $0\le k\le5$. Squaring, we have $100n^2\pm20kn+k^2$.
For $k^2<10\iff0\le k\le3$, the tens digit is always even. For $k=4$ we have numbers ending
in $4$ and $10-4=6$ yielding squares with an odd tens digit, since $4^2={\color{red}1}6$. For $k=5$ we have
$k^2={\color{red}2}5$, so the tens digit is again even.