Skip to main content

2007 AMC 12B Problem 21

Problem 21 of 25HarderNumber Theory

The first 20072007 positive integers are each written in base 3.3. How many of these base-33 representations are palindromes? (A palindrome is a number that reads the same forward and backward.)

Answer choices

Show solution

Solution

A palindrome is fixed by its first half. Counting base-33 palindromes by length gives 22 of length 11 or 2,2, 66 of length 33 or 4,4, 1818 of length 55 or 6,6, and 5454 of length 7.7. That totals 2+2+6+6+18+182+2+6+6+18+18 +54=106+54=106 palindromes with at most 77 digits. Since 2007=22021003,2007=2202100_3, the 77-digit palindromes larger than it are 2210122,2210122, 2211122,2211122, 2212122,2212122, 2220222,2220222, 2221222,2221222, and 2222222,2222222, which is 66 of them. Therefore the count is 1066=100.106-6=100. Thus, the correct answer is A.

More practice

Concepts: number base · palindrome · casework

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.