Math, chess, and cheating

Last week I rather unexpectedly was waylaid by a math problem, which I spent 5 days working on to the exclusion of everything else — eating, sleeping, studying chess,… A college friend of mine sent me the following question, which he discovered 25 years...