Number of decompositions in sum of $s$ elements Let $E=\{ 3^k+3^l; 0\leq k\leq l\}$. For all $n\in \mathbb{Z}$ and $s \geq 1$ denote $r_s(E,n)$ the cardinality of $$ \{(n_1, \ldots ,n_s) \in E^s, n_1+\ldots +n_s=n \}.$$
I'm looking for an upper bound $M_s$ of $\sup _{n\in \mathbb{Z}}r_s(E,n)$ that only depends on $s$. It doesn't have to be a sharp upper-bound, I just need the existence of such a constant.

Consider the ternary representation of $n$. If $r_s(E,n)\ne0$, the sum of the ternary digits of $n$ is bounded by $2s$. Then the values of $k$ and $l$ are limited to at most $2s$ finite regions of size $O(\log_3s)$, since they must not contribute digits that cannot be turned into digits of $n$ by other contributions. That leaves $O((2s\log_3s)^{2s})$ possible choices for the $2s$ values of $k$ and $l$ in the $s$ elements.
