The Banker's Puzzle
Here's another puzzle from the Victorian king of puzzles Dudeney. Unlike the previous ones that I have posted, this one doesn't come from The Canterbury Puzzles, but is from his later masterpiece Amusements in Mathematics. My copy (pictured below) is from 1917, but many of the puzzles inside it were composed by Dudeney in the 1880s and 90s. Thank you very much to the person who saw this in a charity shop and sent it my way.
I'll give the puzzle and its solution in Dudeney's original wording, but to the modern reader I'll remind you that there are 40 sixpences in a pound:
A banker had a sporting customer who was always anxious to wager on anything. Hoping to cure him of his habit, he proposed as a wager that the customer would not be able to divide up the contents of a box containing only sixpences into an exact number of equal piles of sixpences. The banker was first to put in one or more sixpences (as many as he liked); then the customer was to put in one or more (but in his case not more than a pound in value), neither knowing what the other put in.
Lastly, the customer was to transfer from the banker's counter to the box as many sixpences as the banker desired him to put in. The puzzle is to find how many sixpences the banker should first put in and how many he should ask the customer to transfer, so that he may have the best chance of winning.
In order that a number of sixpences may not be divisible into a number of equal piles, it is necessary that the number should be prime. If the banker can bring about a prime number, he will win;and I will show how he can always do this, whatever the customer may put in the box, and that therefore the banker will win to a certainty. The banker must first deposit forty sixpences and then, no matter how many the customer may add, he will desire the latter to transfer from the counter the square of the number next below what the customer put in. Thus, the banker puts in forty, customer, we will say, adds 6, then transfers from the counter 25 (the square of 5), which leaves 71 in all, a prime number. Try again. Banker puts in 40, customer adds 12, then transfers 121 (the square of 11), as desired, which leaves 173, a prime number. The key to the puzzle is the curious fact that any number up to 39, if added to its square and the sum increased by 41, makes a prime number. This was first discovered by Euler, the great mathematician. It has been suggested that the banker might desire the customer to transfer sufficient to raise the contents of the box to a given number; but this would not only make the thing an absurdity, but breaks the rule that neither knows what the other puts in.
Back to Alaric speaking. While the language makes some of this harder to understand than usual, this all works on Euler's favourite quadratic: n^2+n+41. If I've taught you AS maths then you will have met this in our week of logic and proof (that week that I fill with Lewis Carroll) because there it is a nice example of counter-example and the need for proof. Try proving or disproving the statement that n^2+n+41 gives a prime number for all numbers n=0, 1, 2, ...
Amazingly every value of n up to n=40 gives a prime number. You can see that 40 should work without multiplying it out by noticing 40^2+40+41=40(40+1)+41=40(41)+41=41(40+1)=41^2. The very next value of n=41 also trivially gives a non prime because it will have a factor of 41.