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

Home > Numbers
Back to the base (Posted on 2011-03-30) Difficulty: 3 of 5
A certain 10-base integer with distinct digits can be converted to base b by merely reversing its digits.
Find the lowest value of b.

See The Solution Submitted by Ady TZIDON    
Rating: 3.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution (spoiler) | Comment 1 of 3

DEFDBL A-Z
CLS
FOR b = 3 TO 9
  FOR d1 = 0 TO b - 1
    FOR d2 = 0 TO b - 1
       IF d1 * 10 + d2 = d2 * b + d1 AND d1 + d2 > 0 THEN PRINT b, d1; d2
    NEXT d2
  NEXT d1
NEXT b

finds for 2-digit numbers with bases under 10:

 b   decimal digits to be reversed
 4             1  3
 7             2  3
 7             4  6

So the smallest b seems to be 4, where 13 decimal can be represented as 31.

Going to 3-digit numbers would not seem to be able to lower b to 3, as the highest 3-digit base-3 number would be represented as 222 and be the equivalent to 18+6+2=26 decimal, which is only a 2-digit number.


  Posted by Charlie on 2011-03-30 13:02:15
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 (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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