A bpalindrome is an integer that is a palindrome in base
b.
Show how to find a number that is a bpalindrome, of at least three digits, for at least 1000 different values of b.
For example, 200 is not a 10palindrome, but it is a 9palindrome (242) and a 7palindrome (404).
2^(2^101)+2^(2^100)+1 is palindromic in base 2^(2^100), where it is "111". In base 2^(2^99) it is written "10101". In base 2^(2^98) it is written "100010001". The cycle length doubles each time, so by the time you get to base 2 (i.e., base 2^(2^1)), the cycle length is 2^100, having 2^1001 zeroes between the 1's.
For a more interesting, but larger number, 2^(2^101)+2^(2^100+1)+1 is "121" in base 2^(2^100), and it works similarly in all the bases except with a 2 in the middle instead of a 1. It fails, however, when we get to base 2, so we'd have only 99 of them. So we really should use 2^(2^102)+2^(2^101+1)+1, starting with "121" in base 2^(2^101), and working down to base 2^(2^2), i.e., base4.
After seeing Brian Smith's solution, it struck me we don't need that highest power of the base except for the one case. So just start with 2^(2^101)+1, which is "101" in base 2^(2^100), then "10001" in base 2^(2^99), "100000001" in base 2^(2^98), etc.
Edited on February 25, 2004, 3:39 pm

Posted by Charlie
on 20040225 15:35:30 