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 Analytic solution | Comment 4 of 6 |
Begin with the assumption that the first digit is 4, since we are seeking the last time it occurs.  If this ends up not having a solution, then we will assume the first digit is 3.

Knowing the first digit on both pages is 4 means the sod of the last 2 digits on both pages must be 10.  So 4 digits must sum to 10.  This rules out most page pairs (page pairs which have the same second digit) because the last digits will be one even and one odd.  So the second digits must also have opposite parity.  So the last digit of the first page must be 9 and the last digit of the second page must be 0.  But now the sod of the first and last digits is already up to 17 (4+4+9+0).  So the second digits must be a 0 and a 1.  

Hence:  409 and 410, whose sum is 419.

also confirmed with a program showing the 5 pairs:
49 50
139 140
229 230
319 320
409 410
----------------
def sod(n):
    """ Input an integer.  Returns the Sum of the Digits  """
    aList = list(str(n))
    ans = 0
    for c in aList:
        ans = ans + int(c)
    return ans

for i in range(1,500,2):
    if sod(i) + sod(i+1) == 18:
        print(i,i+1)

  Posted by Larry on 2023-08-29 11:02:31
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (13)
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