Sunday Times Teaser 3278 – Page Weight
by Mark Valentine
Published Sunday July 20 2025 (link)
An A5 booklet is produced by printing the pages onto sheets of A4 (both sides), then binding and folding along the middle. The booklet contains two chapters. The longer first chapter runs to 34 pages.
The pages in each chapter are numbered sequentially from 1 upwards. The front cover is page 1 of chapter one. Page 1 of chapter two follows directly after page 34 of chapter one. Any blank pages at the end of the booklet are not numbered.
Without changing their order, the sheets can be split into two piles, where the sums of the page numbers in each pile are equal.
How many pages does the second chapter have?
10 Comments
Leave one →
A particularly nice feature of this version (when the ’35’ in line 11 is changed to ‘ch1 + 1’) is that it then works correctly for other values of the number of pages in chapter one. Here is a version that provides more detailed output and also finds multiple solutions.
This shows that this teaser actually has two solutions because no constraint was placed on the number of A4 pages that could be used. The use of the minimum number of A4 sheets was intended
Testing that the sum of the page numbers is even improves speed
Hi John, Your version is really nice because it is compact and your approach is easy to understand. Ad there is room to make it even shorter and faster since you don’t need to pre-compute the sheets list on line 22:
@John, the sum all page numbers is not only even but also a multiple of 4. This can be seen if you consider summing the page numbers from the most inner sheet towards the most outer sheet.
Hi Brian,
shouldn’t your line 21 be:
otherwise some page numbers are summed twice and the central page numbers not at all?
Curiously, this doesn’t seem to affect the result.
Yes, I meant to copy your line 22 exactly but I missed copying the increment and, because it produced the correct result, I didn’t notice the error. I will correct it
I should have thought of this earlier: It would have been easier and more computationally efficient to rewrite line 20:
Yes, another good idea. I’ll change it again (and correct other errors).