### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,158)
- misc (2)
- project euler (2)
- puzzle (40)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 178,002 hits

Advertisements

Programming Enigma Puzzles

26 March 2017

Posted by on **From New Scientist #2278, 17th February 2001** [link]

While waiting for a much-delayed train, George found himself trying to read a very boring book. He soon gave up and started counting its pages instead. Chapter 1 started on Page 1, and each subsequent chapter started at the top of a page. The boredom factor was enhanced by the fact that the length in pages of each chapter was equal to the chapter number multiplied by the length of Chapter 1.

With still no sign of the train, George proceeded to total all the page numbers in each chapter. Again, the totals for each chapter were exact multiples of the total for Chapter 1, but this time the multiples did not equate to chapter numbers. For the last chapter the multiple was a prime number, even though the chapter number was not.

How many pages were there in the book?

[enigma1122]

Advertisements

%d bloggers like this:

This Python program considers possible values for the number of pages in the first chapter (between 1 and 50 pages), and the total number of chapters in the book (up to 100 chapters). It runs in 47ms.

Solution:There are 105 pages in the book.The book has 6 chapters.

The final multiple, 181, is a prime number and the chapter number, 6, is not.

The sum of the page numbers in chapter k is k(nk² + 1)/(n + 1) times T(n).

In trying to work out why that should be, I got a bit bogged down in tetrahedral numbers,

or perhaps that should be mth triangular numbers where m is itself a triangular number.

Somehow I seem to have lost an hour’s sleep!