All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Book page number (Posted on 2023-08-29) Difficulty: 3 of 5
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.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution with complete list | Comment 3 of 6 |
This happens 5 times in the book. The last time is when it's open to pages 409 and 410, when the total of two page numbers is 819

  left  right
  page  page  total  sod
    49    50    99    18
   139   140   279    18
   229   230   459    18
   319   320   639    18
   409   410   819    18
ct =
     5
There are no solutions where the even number is on the left, the normal structure of a book.

clearvars,clc
ct=0;
for leftPage=1:499
  total=sod(leftPage)+sod(leftPage+1);
  if mod(total,18)==0
    disp([leftPage,leftPage+1,2*leftPage+1,total])
    ct=ct+1;
  end
end
ct

  Posted by Charlie on 2023-08-29 08:52:33
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information