Experimenting with a CAS suggests an induction. In order to handle the induction, we need to consider the forms of the numbers involved. $\frac{4^m-1}{3} = 1 + 2^2 + 2^4 + \cdots + 2^{2m-2}$ alternates $1$ and $0$ bits. The map $2n + 1 \to n - 2^{f(n)}$ drops the rightmost bit (which is $1$) and clears the next least significant bit. The map $2n \to n$ drops the rightmost bit (which is $0$). And the map $2n \to 2n - 2^{f(n)}$ moves the least significant bit right one place. So the numbers which occur in the evaluation tree of $\frac{4^m-1}{3}$ are of the form $2^i + 2^j + 2^{j+2} + \cdots + 2^{j+2k}$ where $i \le j - 2$ and $k \ge 0$; and (when we get down to one bit) the form $2^i$.
Starting with the simplest case, when $i > 0$, $a(2^i) = pa(2^{i-1}) + qa(2^{i-1})$ so by induction $a(2^i) = (p+q)^i$.
For the more general case, let $A(i,j,k) = a(2^i + 2^j + 2^{j+2} + \cdots + 2^{j+2k})$ subject to the aforementioned constraints on $i,j,k$.
For $i > 0$, we have an even argument and use the second case of the recursion:
\begin{eqnarray*}
A(i,j,k) &=& a(2^i + 2^j + 2^{j+2} + \cdots + 2^{j+2k}) \\
&=& pa(2^{i-1} + 2^{j-1} + 2^{j+1} + \cdots + 2^{j+2k-1}) + qa(2^{i-1} + 2^j + 2^{j+2} + \cdots + 2^{j+2k}) \\
&=& pA(i-1, j-1, k) + qA(i-1, j, k)
\end{eqnarray*}
Then it's a trivial proof by induction that $$A(i,j,k) = \sum_{u=0}^i \binom{i}{u} p^u q^{i-u} A(0, j-u, k)$$
For $i = 0$, we have an odd argument and use the third case of the recursion:
\begin{eqnarray*}
A(0,j,k) &=& a(1 + 2^j + 2^{j+2} + \cdots + 2^{j+2k}) \\
&=& a(2^{j+1} + \cdots + 2^{j+1+2(k-1)}) \\
&=& \begin{cases}
a(0) & \textrm{if } k=0 \\
a(2^{j+1}) & \textrm{if } k=1 \\
A(j+1, j+3, k-2) & \textrm{otherwise}
\end{cases} \\
&=& \begin{cases}
1 & \textrm{if } k=0 \\
(p+q)^{j+1} & \textrm{if } k=1 \\
\sum_{u=0}^{j+1} \binom{j+1}{u} p^u q^{j+1-u} A(0, j+3-u, k-2) & \textrm{otherwise}
\end{cases}
\end{eqnarray*}
Further CAS experimentation suggests that the theorem we need to prove is $$A(0, j, 2v-1) = A(0, j, 2v) = \left(p\frac{q^v-1}{q-1} + q^v\right)^{j+1} A(0, 2, 2v-2)$$
The first of those equalities is easy: $$A(0,j,2) = \sum_{u=0}^{j+1} \binom{j+1}{u} p^u q^{j+1-u} A(0, j+3-u, 0) = \sum_{u=0}^{j+1} \binom{j+1}{u} p^u q^{j+1-u} = (p+q)^{j+1}$$ so $A(0,j,1) = A(0,j,2)$ and since the only occurrence of $k$ in the third case is in the parameter $k-2$ the rest follows by induction on $v$.
The second equality is the interesting one. Again, by induction on $v$:
\begin{eqnarray*}
A(0,j,2v) &=& \sum_{u=0}^{j+1} \binom{j+1}{u} p^u q^{j+1-u} A(0, j+3-u, 2v-2) \\
&=& \sum_{u=0}^{j+1} \binom{j+1}{u} p^u q^{j+1-u} \left(p\frac{q^{v-1}-1}{q-1} + q^{v-1}\right)^{j+4-u} A(0, 2, 2v-4) \\
&=& \left[ \sum_{u=0}^{j+1} \binom{j+1}{u} p^u \left(pq\frac{q^{v-1}-1}{q-1} + q^v\right)^{j+1-u} \right] \color{Blue}{\left(p\frac{q^{v-1}-1}{q-1} + q^{v-1}\right)^3 A(0, 2, 2v-4)} \\
&=& \left( p + pq\frac{q^{v-1}-1}{q-1} + q^v \right)^{j+1} \color{Blue}{A(0, 2, 2v-2)} \\
&=& \left(p\frac{q^v-1}{q-1} + q^v\right)^{j+1} A(0, 2, 2v-2)
\end{eqnarray*}
as desired.
The answer to the original question now drops out: $a\left(\tfrac{4^m-1}{3}\right) = A(0, 2, m-2)$, but $A(0, 2, k)$ has the form of a cube times $A(0, 2, k-2)$ so by induction it's always a cube.
Let $n=m^tk$ where $m\nmid k$. Then $f(n)=m^t$.
Furthermore, if $t>0$, then $f(n/m)=m^{t-1}$ and $n-f(n/m)=m^{t-1}(mk-1)$. It follows that $a(n)=a(m^{t-1}k)+a(m^{t-1}(mk-1))$ and further by induction on $t$,
$$
(\star)\qquad a(n)=\sum_{i=0}^t \binom{t}{i} a\big(m^ik-\frac{m^i-1}{m-1}\big).
$$
CASE $m>2$. In this case, formula $(\star)$ reduces to
$$a(n) = a(k)+(2^t-1)a(k-1).$$
Let's analyze $s(n)$.
It is clear that for any $\ell\not\equiv 0\pmod{m}$, we have
$$\sum_{k=0\atop k\equiv \ell\pmod{m}}^{m^n-1} a(k) = s(n-1)$$
and correspondingly
$$\sum_{k=0\atop k\equiv 0\pmod{m}}^{m^n-1} a(k) = s(n) - (m-1)s(n-1)$$
Now we are ready to derive a recurrence for $s(n)$ by grouping the summation indices based on the power $m^t$ they contain:
\begin{split}
s(n) &= 1 + \sum_{t=0}^{n-1} \sum_{k=1\atop k\not\equiv 0\pmod{m}}^{m^{n-t}-1} \left(a(k) + (2^t-1)a(k-1)\right) \\
&=1 +\sum_{t=0}^{n-1} \left((m-1)s(n-t-1) + (2^t-1)((m-2)s(n-t-1) + s(n-t)-(m-1)s(n-t-1))\right) \\
&=1 +\sum_{t=0}^{n-1} \left((m-2^t)s(n-t-1) + (2^t-1)s(n-t)\right) \\
&=2 - 2^n + \sum_{t=1}^n (2^{t-1}+m-1)s(n-t).
\end{split}
Restating the above recurrence in terms of the generating function $S(x):=\sum_{n\geq 0} s(n)x^n$, we have
$$S(x) = \frac{2}{1-x} - \frac{1}{1-2x} + \left(\frac{x}{1-2x} + \frac{(m-1)x}{1-x}\right)S(x).$$
That is,
$$S(x) = \frac{1-3x}{1 - (m+3)x + (2m+1)x^2},$$
from where the required recurrence follows instantly.
CASE $m=2$. In this case, formula $(\star)$ takes form:
$$a(n)=a(k)+\sum_{i=1}^t \binom{t}{i} a(2^{i-1}(k-1)).$$
It further follows that for $n=2^{t_1}(1+2^{1+t_2}(1+\dots(1+2^{1+t_\ell}))\dots)$ with $t_j\geq 0$, we have
\begin{split}
a(n) &= \sum_{i_1=0}^{t_1} \binom{t_1}{i_1} \sum_{i_2=0}^{t_2+i_1} \binom{t_2+i_1}{i_2} \sum_{i_3=0}^{t_3+i_2} \dots \sum_{i_\ell=0}^{t_\ell+i_{\ell-1}} \binom{t_\ell+i_{\ell-1}}{i_\ell} \\
&=\prod_{j=1}^\ell (\ell+2-j)^{t_j}.
\end{split}
Grouping the summands in $s(n)$ by the number of unit bits, we have
\begin{split}
s(n) &= \sum_{\ell=0}^n\ \sum_{t_1+t_2+\dots+t_{\ell}\leq n-\ell}\ \prod_{j=1}^\ell (\ell+2-j)^{t_j}\\
&= \sum_{\ell=0}^n\ \sum_{t_1+t_2+\dots+t_{\ell}+t_{\ell+1} = n-\ell}\ \prod_{j=1}^{\ell+1} (\ell+2-j)^{t_j}\\
&=\sum_{\ell=0}^n [x^{n-\ell}]\ \prod_{j=1}^{\ell+1} \frac1{1-jx} \\
&=\sum_{\ell=0}^n S(n+1,\ell+1) \\
&=B_{n+1},
\end{split}
where $S(n+1,\ell+1)$ are Stirling numbers of second kind, and $B_{n+1}$ is Bell number.
Best Answer
As proved in this answer, for $n=2^tk$ with $2\nmid k$, we have $$a_1(n)=\sum_{i=0}^t \binom{t}{i} a_1(2^i(k-1)+1).$$
Then for $n=2^{t_1}(1+2^{t_2}(1+\dots(1+2^{t_m}))\dots)$ with $t_1\geq 0$ and $t_j\geq 1$ for $j\geq 2$, we have \begin{split} a_1(n) &= \sum_{i_1=0}^{t_1} \binom{t_1}{i_1} \sum_{i_2=0}^{t_2+i_1} \binom{t_2+i_1}{i_2} \sum_{i_3=0}^{t_3+i_2} \dots \sum_{i_\ell=0}^{t_\ell+i_{\ell-1}} \binom{t_\ell+i_{\ell-1}}{i_\ell} \\ &=\prod_{j=1}^\ell (\ell+2-j)^{t_j}, \end{split} where $\ell := \lfloor (m+1)/2\rfloor$.
Correspondingly, \begin{split} s_1(n) &= \sum_{m=0}^{n} \sum_{t_1+t_2+\dots+t_{m}\leq n-1}\ \prod_{j=1}^\ell (\ell+2-j)^{t_j}\\ &= \sum_{m=0}^n\ \sum_{t_1+t_2+\dots+t_{m}+t_{m+1} = n}\ \prod_{j=1}^{\ell+1} (\ell+2-j)^{t_j}\\ &=\sum_{m=0}^n [x^{n-m}]\ \ell! \left(\frac{1}{1-x}\right)^{m-\ell}\prod_{j=1}^{\ell+1} \frac1{1-jx} \\ &=\sum_{m=0}^n [x^{n-m}]\ \ell! \left(\frac{1}{1-x}\right)^{m-\ell}\sum_{q\geq \ell+1} S(q,\ell+1) x^{q-\ell-1}\\ &=\sum_{m=0}^n \ell! \sum_{q\geq l+1} S(q,\ell+1) \binom{n-q}{n-q-m+\ell+1}. \end{split}
Then grouping terms $m=2\ell-1$ and $2\ell$ we have \begin{split} s_1(n)&=\sum_{\ell\geq 0} \ell! \sum_{q\geq l+1} S(q,\ell+1) \binom{n-q+1}{n-q-\ell+2} \\ &=1 + \sum_{\ell\geq 0} \ell \sum_{q= l+1}^{n+1} S(q,\ell+1) (n-q+1)_{l-1}\\ &=1 + \sum_{q=1}^{n+1} \sum_{\ell\geq 0} \ell S(q,\ell+1) (n-q+1)_{l-1}\\ &=1 + \sum_{q=1}^{n+1} \sum_{\ell\geq 0} (S(q+1,\ell+1) - S(q,\ell+1) - S(q,\ell)) (n-q+1)_{l-1} \\ &=1 + \sum_{q=1}^{n+1} \left(\frac{(n-q+3)^q}{n-q+2} - \frac{(n-q+3)^{q-1}}{n-q+2} - (n-q+2)^{q-1}\right) \\ &=1 + \sum_{q=1}^{n+1} \left((n-q+3)^{q-1} - (n-q+2)^{q-1}\right) \\ &=1 + \sum_{i=0}^{n} i(i+1)^{n-i}. \end{split}
$s_2(n)$ can be treated similarly.