How many ordered 11-tuples $(a_0,a_1,a_2,...,a_{10})$ of integers satisfy the equation $$a_0+2a_1+2^2a_2+...+2^{10}a_{10}=2020$$ where $0\le a_i\le 2$ for all $0\le i\le10$ AMC Mock
If $f(n)$ is the number of ways that the number $n$ can be written, the solution uses a "binary" number system where 2 is also a valid digit and shows the following recursions/functional equations:
$$1:f(2n)=f(n)+f(n-1)$$ (1 holds since you can append a zero at the end of any valid representation of $n$, or a 2 at the end of any valid representation of $n-1$ to get $2n$)
$$2: f(2n+1)=f(n)$$
(2 holds since you can append a 1 at the end of any valid representation of $n$ to get $2n+1$) $$3: f(2^k-2)=k$$ $$4: f(4n)=f(n)+2f(n-1)$$
Are there other interesting properties of this kind of system apart from the ones above?
Both references to theory and questions will help.
Unless I made a mistake, my brute force implementation seems to indicate the answer to your first question above is $51$.
Here's a list of solutions where $x=2$ that perhaps provides a bit more insight.
$$\begin{array}{cc} \# & \text{Solution} \\ 1 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+x^4+x^3+2 x^2+x+2=2020 \\ 2 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+x^4+x^3+2 x^2+2 x=2020 \\ 3 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+x^4+2 x^3+x+2=2020 \\ 4 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+x^4+2 x^3+2 x=2020 \\ 5 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+x^4+2 x^3+x^2=2020 \\ 6 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+2 x^4+x+2=2020 \\ 7 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+2 x^4+2 x=2020 \\ 8 & 2 x^9+2 x^8+2 x^7+2 x^6+2 x^5+2 x^4+x^2=2020 \\ 9 & x^{10}+2 x^8+2 x^7+2 x^6+2 x^5+x^4+x^3+2 x^2+x+2=2020 \\ 10 & x^{10}+2 x^8+2 x^7+2 x^6+2 x^5+x^4+x^3+2 x^2+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x^4+x+2=2020 \\ 31 & x^{10}+x^9+x^8+2 x^6+2 x^5+2 x^4+2 x=2020 \\ 32 & x^{10}+x^9+x^8+2 x^6+2 x^5+2 x^4+x^2=2020 \\ 33 & x^{10}+x^9+x^8+x^7+2 x^5+x^4+x^3+2 x^2+x+2=2020 \\ 34 & x^{10}+x^9+x^8+x^7+2 x^5+x^4+x^3+2 x^2+2 x=2020 \\ 35 & x^{10}+x^9+x^8+x^7+2 x^5+x^4+2 x^3+x+2=2020 \\ 36 & x^{10}+x^9+x^8+x^7+2 x^5+x^4+2 x^3+2 x=2020 \\ 37 & x^{10}+x^9+x^8+x^7+2 x^5+x^4+2 x^3+x^2=2020 \\ 38 & x^{10}+x^9+x^8+x^7+2 x^5+2 x^4+x+2=2020 \\ 39 & x^{10}+x^9+x^8+x^7+2 x^5+2 x^4+2 x=2020 \\ 40 & x^{10}+x^9+x^8+x^7+2 x^5+2 x^4+x^2=2020 \\ 41 & x^{10}+x^9+x^8+x^7+x^6+x^4+x^3+2 x^2+x+2=2020 \\ 42 & x^{10}+x^9+x^8+x^7+x^6+x^4+x^3+2 x^2+2 x=2020 \\ 43 & x^{10}+x^9+x^8+x^7+x^6+x^4+2 x^3+x+2=2020 \\ 44 & x^{10}+x^9+x^8+x^7+x^6+x^4+2 x^3+2 x=2020 \\ 45 & x^{10}+x^9+x^8+x^7+x^6+x^4+2 x^3+x^2=2020 \\ 46 & x^{10}+x^9+x^8+x^7+x^6+2 x^4+x+2=2020 \\ 47 & x^{10}+x^9+x^8+x^7+x^6+2 x^4+2 x=2020 \\ 48 & x^{10}+x^9+x^8+x^7+x^6+2 x^4+x^2=2020 \\ 49 & x^{10}+x^9+x^8+x^7+x^6+x^5+x+2=2020 \\ 50 & x^{10}+x^9+x^8+x^7+x^6+x^5+2 x=2020 \\ 51 & x^{10}+x^9+x^8+x^7+x^6+x^5+x^2=2020 \\ \end{array}$$
Here's the Mathematica code I used to generate the results above
where the function incA referenced above is defined as follows: