This follows from W. M. Schmidt's Subspace theorem, which is a deep theorem in diophantine approximations generalizing Roth's to several variables. A full account of this theorem and its proof, as well as some of its striking applications, can be found in chapter 7 of *Heights in Diophantine Geometry* by Bombieri and Gubler. The following result, the finiteness of the number of non-degenerate solutions to the so-called "$S$-unit equation," is a straightforward application of Schmidt's theorem. (See Theorem 7.4.2 in [HIDG]): *Let $S$ be a finite set of prime numbers, and fix $n \in \mathbb{N}$. Consider $\mathcal{X}$ the set of solutions to $x_1 + \cdots + x_n = 1$ in rational numbers $x_i$ of the form $\pm \prod_{p \in S} p^{a_i}$, $a_i \in \mathbb{Z}$, such that non proper subsum of $x_1+\cdots+x_n$ vanishes. Then $\mathcal{X}$ is a finite set.* This implies your question immediately upon considering $S := \{2,3,5,7\}$. However, the proof of the Subspace theorem is not effective, and this only shows $S(3^n) \to +\infty$ without any lower estimate on the rate of growth. I believe it is still an open problem to give an explicit (effective) lower bound on $S(3^n)$ which goes to infinite with $n$, but I am not entirely sure about this.