Help me solve my father's riddle and get my book back
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)
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, $$
whence
$$ 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!
Let $p,p+1$ be the pagenumbers of the pages he is holding. Assume the book has $n$ pages. Then:
$$81707=\sum_{i=1}^ni-(p+p+1)=\frac{n(n+1)}{2}-2p-1.$$
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,
$$n=\frac{-1+808+k}{2}=\frac{807+k}{2}.$$
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.$
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
equalpageNumber
.-
While
totalPageSum
is less thanremainingPageSum
:Increment
pageNumber
by 1, andIncrement
totalPageSum
bypageNumber
.
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.
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?