My father is a mathteacher and as such he regards asking tricky questions and playing mathematical pranks on me once in a while as part of his parental duty.
So today before leaving home he sneaked into my room and took the book I am currently reading!

The book is quite old and damaged with one or two pages torn out and as I checked my phone in the morning I find a message along the lines of this:

[A picture of him proudly grinning and holding a torn out page in his hand]

Dear Levix, if you want to know where your book lies then tell me: What page am I holding when the sum of all remaining page numbers (without those 2 he is holding) is equal to $81707$? :)

Can anybody provide any advice? (it would be awesome if we could find a general solution to stick it to the man for good. ;) )

Update: First, I want to thank you all for your kind effort and for helping me out so rapidly! I enjoyed your intelligible answers so much that I couldn't resist to use this knowledge against him :) The final response I gave was that If the sum of all remaining page numbers had been my birthday than the last 2 digits + 10 (32 41, 32 42) would have added up to the page numbers of the turn out page he was holding. I not only got my book back - I also received a great big hug. So thank you!

(Pluspoints if you can calculate my birthday)

5 Answers5


The book contains $p$ sheets (leafs) and has therefore pagenumbers from $1$ to $2p$. The sum of all the pagenumbers is then given by

$$ \sum_{i=1}^{2p}i =p \Big( 2p + 1 \Big). $$

The father holds the page with page number $n$ in his hand, so we need to solve

$$ 81,707 = p \Big( 2p + 1 \Big) - n. $$

As $81,707 \le p \Big( 2p + 1 \Big)$, we obtain

$$ p \ge 202, $$

but as $n \le 2p$, we obtain

$$ p \Big(2 p + 1 \Big) - 81,707 \le 2 p, $$


$$ p \le 202, $$

so the book contains $202$ pages, whence the page number is given by

$$ 202 \times 405 - 81,707 = 103. $$

The question is: if the father is holding a page $x$ does that mean to exclude the pagenumbers on both sides of the page?

Then the page that you father is holding is $51/52$.

Hope you get your book back!

  • 6,147
  • 17
  • 20
  • 3
    A book contains $n$ pages and therefore has pagenumbers from $1$ to $n$. What you are calling "pages" are actually leafs. But your end result: pages 51 and 52, is correct. – Christian Blatter Jul 21 '14 at 19:51
  • @Christian: You are correct about that, thanks for the correction. I considered a page to be that what has two sided, while is is one. It does not change the outcome. – johannesvalks Jul 21 '14 at 19:56
  • 1
    @ChristianBlatter I think the correct term is sheet, not leaf. – becko Jul 22 '14 at 17:41
  • 1
    @becko Leaf is valid as well: "something suggestive of a leaf ... a part of a book or folded sheet containing a page on each side" http://www.merriam-webster.com/dictionary/leaf – Dan Is Fiddling By Firelight Jul 22 '14 at 19:06
  • 1
    "but as $n \le 2p$" I'm not sure that's a safe assumption as `n` is the sum of two page numbers if the page comes from the second half of the book, $n \ge 2p$. – Holloway Jul 23 '14 at 10:29
  • Books can have an odd number of pages. The back side of the final leaf need not be numbered. – jamesdlin Jul 23 '14 at 11:25

Let $p,p+1$ be the pagenumbers of the pages he is holding. Assume the book has $n$ pages. Then:


It is clear that $\frac{n(n+1)}{2}$ must be an even number, say $2m.$ So

$$81707=2m-2p-1=2(m-p)-1\implies m-p=40854.$$ That is

$$\frac{n(n+1)}{4}=p+40854,$$ from where

$$n=\frac{-1+\sqrt{1+16(p+40854)}}{2}.$$ Since the number of pages has to be a natural number, $16p+653665$ must be a square. Since $\sqrt{16p+653665}>808$ we have that $\sqrt{16p+653665}=808+k$ for some natural number $k.$ That is,


For $k=1$ we have $n=404$ and $p=51.$

For $k=2$ (or any even number) $n$ is not an integer.

Since $n(n+1)$ is a multiple of $4$ we have that $n$ is a multiple of four or a multiple of $4$ minus one. So $k$ must be a multiple of $8$ minus/plus one. So, the next case to consider is $k=7.$ In such a case, $n=407$ and $p=660>n=407,$ which is impossible. (The same happens for bigger values of $k,$ which shows that the solution is unique.)

So, the book has pages numbered from $1$ to $404$ and the given pages have numbers $51$ and $52.$

  • 28,821
  • 1
  • 28
  • 48

Here's a simple solution to the problem using a bit of programming.

  • Let remainingPageSum equal 81707.

  • Let a page number counter pageNumber equal 1.

  • Let totalPageSum equal pageNumber.

  • While totalPageSum is less than remainingPageSum:

    • Increment pageNumber by 1, and

    • Increment totalPageSum by pageNumber.

Now you have totalPageSum equal to 81810. Subtract remainingPageSum from totalPageSum to get the sum of the removed page numbers, 103. The two consecutive page numbers having a sum of 103 will be floor(103 / 2) and ceil(103 / 2), or 51 and 52.

Test it out here.

  • 71
  • 2
  • wow! That's incredible - thank you. –  Jul 22 '14 at 17:32
  • @Levix I *think* this is essentially the same as most of the other answers here -- put simply, you want to find the smallest [triangular number](http://en.wikipedia.org/wiki/Triangular_number) greater than the remaining page sum, subtract the remaining page sum from that number, and split the result in half. This is just a simple algorithmic approach to accomplishing that. – user165761 Jul 22 '14 at 18:20

Let there be $n$ pages, and suppose your father is on page $k$. Then you want $$\sum_{i=k+1}^ni=81707$$ Do you know how to calculate this sum?

  • 17,619
  • 2
  • 33
  • 64
  • Maybe $k$ is kind of big, like around $40000$. Or even bigger. – André Nicolas Jul 21 '14 at 18:59
  • @André: true, and I just saw the comments on the OP about what "remaining" was supposed to mean. I think I'll delete my answer. – symplectomorphic Jul 21 '14 at 19:01
  • 3
    It is one interpretation of the wording, so there is no good reason to delete. – André Nicolas Jul 21 '14 at 19:02
  • With this interpretation, there will be exactly two solutions, both unreasonably large. (Hint: 81707 is a prime number!) – Per Manne Jul 21 '14 at 19:09
  • @Per Manne: I agree (see above), but then again, we didn't know that the father knew what he was talking about, enough to ask a well-posed, realistic question... But it's clear now that "remaining pages" was meant to refer to all other pages in the book. – symplectomorphic Jul 21 '14 at 19:12
  • Why we assume the last page is even? – hlapointe Jul 21 '14 at 20:57
  • @AndréNicolas Is there even a book that has more than 40,000 pages? The biggest book I could find is Artamène ou la grande cyrus, which only has 13,000 pages. Even the Encyclopedia Brittanica only has 32,640 pages. – Nzall Jul 23 '14 at 13:38
  • 1
    Yes, but we are in the realm of pure thought. I was only concerned with the non-uniqueness under the "rest of the pages" interpretation. – André Nicolas Jul 23 '14 at 13:42


your book has n=404 pages, so the sum of all pages is n(n+1)/2=81810, since the sum must be 81707, the page missing must be 103

if your book had 405 pages, the sum would be 82215, and the page missing would have to be 508 --impossible

if your book had 403 pages, the sum would be 81406, not enough

edit: The solution before is assuming 1 number per page. If you have two consecutive numbers per page instead:

$51$ and $52$

if your book had 403 pages, the sum would be 81406, not enough

your book could have 404 pages, the sum of its pages be 81810, and the missing page have numbers 51 and 52

if your book had 405 or 406 pages, the sum of its pages would be 82215 and 82621 respectively, and you would have 508 and 914 extra in the sum. These are even numbers, and no consecutive numbers add up to an even number, so we rule out these possibilities.

your book could have 407 pages, the sum of its pages be 830284, then the missing page should have numbers 660 and 661--impossible

Matias Morant
  • 475
  • 2
  • 7