Bob is reading a 500 page book, with odd numbered pages on the left, and even numbered pages on the right. Multiple times in the book, the sum of the digits of the two opened pages are 18. Find the sum of the page numbers of the last time this occurs.
We did not need to be told that odd numbered pages were on the left and even numbered pages on the right.
In most cases, sod(N-1) and sod(N) have different odd-even parity, because they are only 1 digit different, so their sum is odd. The only exception can be when N is a multiple of 10, which is when more than one digit changes between N-1 and N.
So, if even numbered pages were on the left, the sum would never be 18.
And we only need to explore pages where the left-hand page ends in 9 and the right hand page ends in zero.
Edited on August 29, 2023, 7:50 am