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

Home > Numbers
B-Palindromes (Posted on 2004-02-25) Difficulty: 4 of 5
A b-palindrome is an integer that is a palindrome in base b.

Show how to find a number that is a b-palindrome, of at least three digits, for at least 1000 different values of b.

For example, 200 is not a 10-palindrome, but it is a 9-palindrome (242) and a 7-palindrome (404).

No Solution Yet Submitted by DJ    
Rating: 4.0000 (6 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution A solution | Comment 2 of 11 |

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^100-1 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., base-4.

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 2004-02-25 15:35:30

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 (3)
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