AMC 12B 2007 Problem 21

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

Answer Choices
A. 100
B. 101
C. 102
D. 103
E. 104