Sunday Times Teaser 2665 – Milky Ways
by H Bradley and C Higgins
A farmer who has cows ear tagged 1, 2, 3, …, milks them in individual booths also numbered 1, 2, 3, … The cows choose booths randomly.
The farmer has noticed during milking that frequently no cow is in a booth with a number that matches their own.
So he has worked out the number of different ways this can happen. He has also worked out how many different arrangements there are in which one or more cows are in booths with matching numbers.
The two answers are both less than one million and the sums of their digits are the same.
How many cows are in the herd?