Sunday Times Teaser 2948 – A Hardy Annual
by Victor Bryant
Published March 24 2019 (link)
Yesterday was my grandson’s birthday and we continued a family tradition. I asked him to use any eight different non-zero digits (once each) to form a set of numbers that added to 2019. Last year I asked the equivalent question with a sum of 2018, and I have done this each year for over ten years. Only on one occasion has he been unable to complete the task.
In this year’s answer his set of numbers included a 3-figure prime that had also featured in last year’s numbers.
(a) In which year was he unable to complete the task?
(b) What was the 3-figure prime that featured in this year’s answer?
8 Comments
Leave one →
You seem to dismiss (4, 2, 2) (like 24 + 37+ 1958 = 2019) and (4, 2, 1, 1) (like 2 + 4 + 35 + 1978 = 2019) as an option for the year he was unable to complete the task.
(4, 1, 1, 1, 1) is not possible unless you go back to the year 2005. I would certainly go back to 2005 as it says “each year for over ten years”. So he may have started in fi 2003.
Yes, I only consider numbers of the form set out in the comments since
numbers of these forms are sufficient to find the solutions for part
(b) and, as it turns out, for part (a) as well .
At the time I didn’t publish the solution I used to check for all part (a)
solutions:
because it was slow (and not needed) . But it shows that 2006 is a second
impossible year.
Thanks for the code.
Jim ingeneously found a way to use combinations instead of permutations in a recursive routine.
If you would like to complete it, i will update your post if you let me have the revised version.
Yes, please do. I have a patched version ready. It gets rid of some variables with no function at all as well as it pays attention to both questions.