For any $j\in\mathbb{N}_{\geq 0}$, let $$ I_j := \sum_{n_1,\dots,n_2j=1}^{\infty} a_{n_1} \dots a_{n_{2j}} $$
where $a:\mathbb{N}_{\geq1}\to\mathcal{A}$ is a sequence into some algebra. Assume that we wanted to get the even part $E(I_j)$ of this sum, i.e., discard of it all the summands where an odd power of $a_k$, for all $k$, appears.
How then to write in an efficient way $E(I_j)$?
Here is what I thought:
Let $P$ be an integer partition of $j$. Then we have $p_1+\dots+p_{s_P}=j$ for some $s_P\geq 1$ (the number of summands in the partition). We may also write this partition as $j = \sum_{l=1}^{\infty} \alpha_l \times l$ where $\alpha_l = 0,1,\dots$ is the number of times $l$ appears in the partition. Define $c_P := \frac{(2j)!}{(2p_1)!\dots(2p_{s_P})!}\frac{1}{\prod_{l=1}^{\infty}\alpha_l!}$.
Then we write
$$ E(I_j) = \sum_{P \text{ is a partition of j}}c_P \sum_{n_1,\dots,n_{s_P}\text{ all distinct}} a_{n_1}^{2p_1}\dots a_{n_{s_P}}^{2p_{s_P}}.$$
Question: Is this correct? Is this a good way to write this?