Define $A(0), A(1), A(2) \dots$ in ${\bf Z}/3[[x]]$ as follows. For $n$ in $\bf N$ let $s=3^{2n+1}$. Then $A(n) = \sum a_kx^k$ where $a_k$ is the mod 3 reduction of the number of representations of $k$ by the principal positive binary quadratic form of discriminant $-s$, and the sum runs over all $k$ prime to 3.
Example 1__ When $n=0$, we take the form to be $u^2+uv+v^2$. The number of representations of any non-zero $k$ by this form is a multiple of 6, and so $A(0)=0$.
Example 2__ $-A(1)$ is the mod 3 reduction of (the expansion of) the usual weight 12 cusp form for the full modular group.
Experiment suggests a recursion for the $A(n)$ which would allow one to write each $A(n)$, $n>0$, as a polynomial of degree $(s-3)/24$ in $A=A(1)$. Explicitly I ask if the following holds:
(*)_ $A(n+2)=(A^{3s}+A^{2s}+1)A(n+1)-A^{2s}A(n)$
If (*) holds, then for example:
$A(2)=A^{10}+A^7+A$
$A(3)-A(2) = \sum A^k$, $k$ in $\{91,88,82,64,61\}$
$A(4)-A(3) = \sum A^k$, $k$ in $\{820,817,811,793,790,739,736,730,577,574,568,550,547\}$
I've experimentally verified the above 3 identities, and I'm sure that modular forms could be used to settle the truth of (*) for any fixed $n$.
EDIT: As far as the weaker question of finding a proof that each $A(n)$ is a polynomial in $A$, there is a possibly relevant article by Skoruppa. (arXiv:0807.4694v2---Reduction mod $\ell$ of theta series of level $\ell^n$). But his main result is restricted to characteristic >3. I quote the result:
It is proved that the theta series of an even lattice whose level is a power of a prime $\ell$ is congruent modulo $\ell$ to an elliptic modular form of level one.
(Note that every elliptic modular form over $\bf Q$ of level 1 has as its modulo 3 reduction a polynomial in $A$. So one would want to extend Skoruppa's result to $\ell=3$).
EDIT: It seems one can use an earlier result of Serre, Theorem 5.4 of "Divisibilite ..." appearing in L'Enseignement Mathematique (1976) to quickly show that the A(n) are polynomials in A. Namely let m=(s+1)/4, and consider the quaternary form uu+uv+mvv+ww+wt+tt. It's classical that the theta series attached to this form is a weight 2 modular form for Gamma_0 (N), where N is a power of 3. The Serre theorem just cited shows that the mod 3 reduction of such a modular form is the reduction of a modular form for Gamma(1), and so is a Z/3 linear combination of powers of delta= -A.
Now the reduction of the theta series for ww+wt+tt is 1, so the reduction of the theta series for uu+uv+mvv is also a Z/3 linear combination of powers of A. It follows that A(n) is a Z/3 linear combination of A, A^4, A^7, A^10,...