The sequence $a_n$ is defined by $a_1=1$, and then recursively for $n\geq1$:
$$\begin{align*}
a_{2n} &=2a_n\\
a_{2n+1} &=a_n-3a_{n+1}
\end{align*}$$
The first ten terms are $1, 2, -5, 4, 17, -10, -17, 8, -47, 34$.
Define $\displaystyle S_1(m) = \sum_{n=1}^m a_n$, $\displaystyle S_2(m) = \sum_{n=1}^m S_1(n)$, $\displaystyle S_3(m) = \sum_{n=1}^m S_2(n)$.
You are given $S_1(9) = -47$, $S_2(9) = -23$, $S_3(9) = 91$.
Find $S_3(3^N)$.