A certain 10base integer with distinct digits can be converted to base b by merely reversing its digits.
Find the lowest value of b.
DEFDBL AZ
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 2digit 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 3digit numbers would not seem to be able to lower b to 3, as the highest 3digit base3 number would be represented as 222 and be the equivalent to 18+6+2=26 decimal, which is only a 2digit number.

Posted by Charlie
on 20110330 13:02:15 