<s>[INST] Numbers of the form $\sum_{n=0}^{N} 2^{a_n} 3^n$ Just out of curiosity.
Does the numbers of the form
\begin{align}
 \sum_{n=0}^{N} 2^{a_n} 3^n \text{,}
\end{align}
with $a_n \ge 0$ and $N \ge 0$, cover all integers not divisible by 3?
These numbers can never be divisible by three.
It is also easy to discover integers with multiple representations (e.g., $4 = 2^2 3^0 = 2^0 3^0 + 2^0 3^1$).
I am however stuck to prove that they cover all integers not divisible by 3.
Second question: The numbers of the form
\begin{align}
 \sum_{n=0}^{N} 5^{a_n} 3^n \text{,}
\end{align}
with $a_n \ge 0$ and $N \ge 0$, are numbers congruent to $\{1, 4, 5, 8\} \pmod{12}$.
These are the numbers not divisible by 3 and not $\{ 2, 3 \} \pmod{4}$.
Many other such forms may be considered.
What is the name of such numbers (numbers of such a form)?
 [/INST] If $x \le 8$, then all numbers not divisible by $3$ have the desired form as one can check by hand (e.g. $1=1$, $2=2$, $4=4$, $5=2+3$, $7=1+2 \cdot 3$, $8 = 8$).
If $x > 8$, and $x \equiv 1,2,4,5,7,8 \bmod 9$, then let $m = 4,8,1,2,4,2$ respectively, so $m$ is a power of $2$ and $x \equiv m \bmod 3$ but $x \not\equiv m \bmod 9$. Now write
$$x = m + 3y$$
Now, by construction, $y<x$ is not divisible by $3$. By induction, it has the required form, which implies that $x$ also has the required form. Indeed from this proof you see that one can take the power of $2$ to be in the set $\{1,2,4,8\}$.
</s>