Let $n$ be a positive integer. Find the number of polynomials $P(x)$ with coefficients in $\{0, 1, 2, 3\}$ for which $P(2) = n$.
Source: Romania TST for IMO 1994,third test
Tags: algebra
Let $n$ be a positive integer. Find the number of polynomials $P(x)$ with coefficients in $\{0, 1, 2, 3\}$ for which $P(2) = n$.