There are solutions for number of knights on each side equal to 4, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16. For example, here's one for 16:
. . 2 1 2 1 . .
. 2 . 2 1 . 1 .
. 1 2 1 2 1 2 .
1 . . . . . . 2
2 . . . . . . 1
. 2 1 2 1 2 1 .
. 1 . 1 2 . 2 .
. . 1 2 1 2 . .
I used integer linear programming, with a binary decision variable $x_{i,j,k}$ to indicate if cell $(i,j)$ contains a knight of color $k$. For each cell $(i,j)$, let $N_{i,j}$ be the set of neighboring cells (one knight's move away). You can define this set compactly as
$$N_{i,j}=\{i'\in\{1,\dots,8\}, j'\in \{1,\dots,8\}:|i-i'|\cdot|j-j'|=2\}.$$
The constraints are:
\begin{align}
\sum_{i,j} x_{i,j,k} &= n &&\text{for all $k$}\\
\sum_k x_{i,j,k} &\le 1 &&\text{for all $i,j$}\\
3 x_{i,j,k} \le \sum_{(i',j')\in N_{i,j}} x_{i',j',k'} &\le 3 + (|N_{i,j}|-3)(1 - x_{i,j,k}) &&\text{for all $i,j,k,k' \not= k$}
\end{align}
The first constraint forces exactly $n$ knights of each color.
The second constraint forces at most one knight per cell.
The third constraint forces exactly 3 opponent neighbors if $x_{i,j,k}=1$.