Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Your sum (for $n>0$) is equal to (or should be equal to) $$\sum_{k=1}^n \sum_{j_1+\cdots+j_k=n}(-1)^{n-k}\frac{n!}{j_1!\, j_2!\,\cdots j_k!}.$$ where $j_1,\dots, j_k$ must be positive. This is $n!$ times the coefficient of $x^n$ in $$\sum_{k=0}^\infty\left(\sum_{j=1}^\infty (-1)^{j-1}\frac{x^j}{j!}\right)^k.$$
@TAmdeberhan Yes, if $q$ is not a prime then the number $a_q(n)$ as defined are not integers. The “right” analogue of Michael Somos's equation when $q$ is a power of the prime $p$ is $$A_q(x)^q = \frac{A(x^p)^{q/p}}{1-qxA(x^p)^{q/p}}.$$ (We also require that $A_q(0)=1$.) The coefficients of $A_q(x)$ defined this way are integers.
My preprint has appeared as Ira M. Gessel, Counting tanglegrams with species, J. Combin. Theory Ser. A 184 (2021), Paper No. 105498, 15 pp., doi.org/10.1016/j.jcta.2021.105498.