A special congruence For any $a, b\in\mathbb{N}$ with $a+2b\not\equiv 0\pmod 3$, we define $\delta(a, b)$ as follows:
\begin{align*}
\delta(a, b)={\left\{\begin{array}{rl}
1,\ \ \ \ &{\rm if} \ a+2b\equiv 1\pmod 3,\\
0,\ \ \ \ &{\rm if} \ a+2b\equiv 2\pmod 3.
\end{array}\right.}
\end{align*}
Furthermore, for any $m, n\in\mathbb{N}$, we let
$$s(m, n)=\sum\limits_{a=0}^m\sum\limits_{b=0\atop a+2b\not\equiv 0\pmod 3}^n
(-1)^{m+n-a-b}2^{\delta(a, b)}\binom{m}{a}\binom{n}{b}.$$
I want to know how to prove that $s(m, n)\equiv 0\mod 3^k$, where $k=[(m+n)/2]$.
 A: We can rewrite the sum as
$$\sum_{a=0}^{m} (-1)^a \binom{m}{a}\sum_{\substack{b=0 \\ 3 \nmid a+2b}} (-1)^b 2^{\delta(a,b)} \binom{n}{b}$$

*

*Now, when, $a=3k+1$, then we have $b=3k$ or $3k-1$.

Then for, $b=3k$, $\delta(a,b)=1$ and for $b=3k-1$ and $\delta(a,b)=0$.


*Similarly, when $a=3k-1$, $b=3k, \delta(a,b)=0$ and $b=3k+1 ,\delta(a,b)=1$


*When, $a=3k$, $b=3k+1 ,\delta(a,b)=0$ and $b=3k-1 ,\delta(a,b)=1$
[$\omega$ is the cube root of unity]
Then, $$\sum_{\substack{b=0 \\b=3k}}^{n} (-1)^b \binom{n}{b}=\frac{1}{3}[(1-\omega)^n+(1-\omega^2)^n]=A_n$$
Similarly, $$\sum_{\substack{b=0 \\b=3k-1}}^{n} (-1)^b \binom{n}{b}=\frac{1}{3}[\omega(1-\omega)^n+\omega^2(1-\omega^2)^n]=C_n$$
And, $$\sum_{\substack{b=0 \\b=3k+1}}^{n} (-1)^b \binom{n}{b}=\frac{1}{3}[\omega^2(1-\omega)^n+\omega(1-\omega^2)^n]=B_n$$
Then, $$\sum_{a=0}^{m} (-1)^a \binom{m}{a}\sum_{\substack{b=0 \\ 3 \nmid a+2b}}^{n} (-1)^b 2^{\delta(a,b)} \binom{n}{b} =2(A_nB_m+B_nC_m+C_nA_m)+(A_mB_n+B_mC_n+C_mA_n)$$
$=-[(1-\omega)^{m+1}(1-\omega^2)^n+(1-\omega^2)^{m+1}(1-\omega)^n$.
$=-(1-\omega)^{m+n}[(1+\omega)^{m+1}+(1+\omega)^n]$
From Wolfram Alpha we get
$-(1-\omega)^{m+n}[(1+\omega)^{m+1}+(1+\omega)^n] \\ =-2.3^{\frac{m+n+1}{2}}[\cos(\frac{\pi (m+1-n)}{6})]$
This is divisible by $3^{\lfloor \frac{m+n}{2} \rfloor}$.
