Enigma 1482: Piling on the agony
11 November 2012
Posted by on
From New Scientist #2644, 23rd February 2008
My nephew was playing with some counters, so I decided to give him a mathematical exercise using them. I asked him to calculate how many ways there were of dividing his counters into three piles. For example, eight counters could be divided into three piles five ways, namely 1+1+6, 1+2+5, 1+3+4, 2+2+4 and 2+3+3.
After some time he wrote down his four-digit answer but I assumed that he had made a slight error in writing it down because I knew the correct answer and saw that in his number the middle two digits had been swapped over.
However, it turned out that he had made his error when counting, not when writing the number down. He had assumed that the three piles had to contain different numbers of counters, and had done his calculations accordingly. (So for example, with eight counters he would have got the answer “two” rather than “five””.)
How many counters did he have?
This puzzle marks the start of my attempts at programmatic solutions to Enigma puzzles as they are published. Before this I only attempted them sporadically, when a puzzle caught my fancy. Eventually I decided to collect my solutions and put them up on this site.