Let $\mathcal{F}:=\{f_a\}_{a\in\mathbb{Z}}$ be a set of symbols indexed by the integers and satisfying the rules: $$f_a=f_{-a} \qquad \text{and} \qquad f_af_b=f_{a+b}+f_{a-b}.$$ Define a linear operator $\mathcal{L}$ on $\mathcal{F}$ according to $$\mathcal{L}f_a=\begin{cases} 1 \qquad \text{if $a=0$} \\ 0 \qquad \text{otherwise}. \end{cases}$$ For example, $\mathcal{L}f_af_b=\mathcal{L}f_{a+b}+\mathcal{L}f_{a-b}$. >**Question** If $a_i\in\mathbb{Z}$, then is there a nice formula or an efficient algorithm to compute $$\mathcal{L}(f_{a_1}f_{a_2}\cdots f_{a_k}) \,\,?$$