Sunday Times Teaser 2994 – Consecutive Sums
by Bill Kinally
Published Sunday February 09 2020 (link)
Amelia noticed that 15 is equal to 1+2+3+4+5 or 4+5+6 or 7+8, so there are three possible ways that it can be expressed as the sum of consecutive whole numbers. She then told Ben that she had found a three-digit number which can be expressed as the sum of consecutive whole numbers in just two different ways. “That’s interesting”, said Ben. “I’ve done the same, but my number is one more than yours”.
What is Ben’s number?
4 Comments
Leave one →
Runs in less than 5 milliseconds.
Here is a solution based on an analysis that leads to a solution based on a the generalised Pell’s equation. This requires the latest version of my Python number_theory library available here>.