How many of the first 100 positive integers are expressible as a sum of three or fewer members of the set
{3^0, 3^1, 3^2, 3^3, 3^4} if we are allowed to use the same power more than once. For example, 5 can be represented, but 8 cannot.
1994 UNC Charlotte Comprehensive Exam