Here was a problem I thought of after seeing the 2017 HMMT #5:
For all positive integers $n$, what is the closed form of the summation of $\sum_{a+b+c+d=n}(3^a)(9^b)(27^c)(81^d)$, where $a, b, c,$ and $d$ are non-negative integers.
Here was the original 2017 HMMT #5.
https://hmmt-archive.s3.amazonaws.com/tournaments/2017/feb/algnt/problems.pdf
In that problem they just solved using casework, but I am unable to do that here. I tried breaking up the summations but was confused on how to do so. I think that generating functions may be the key to solving this problem but I don't know how to use them. How would I find the closed form of the summation I though of?
It is true you can solve this problem using generating function.
Let $(\alpha_1, \alpha_2, \alpha_3,\alpha_4) = (3,9,27,81)$, the sum at hand can be rewritten as
$$\Lambda_n \stackrel{def}{=} \sum_{\sum_{k=1}^4 e_k = n}\prod_{k=1}^4 \alpha_k^{e_k}$$ Multiply both sides by $z^n$ and sum over $n$ from $0$ to $\infty$, the corresponding OGF (oridinary generating function) equals to
$$\begin{align} \Lambda(z) \stackrel{def}{=} \sum_{n=0}^\infty \Lambda_n z^n &= \sum_{e_1=0}^\infty\sum_{e_2=0}^\infty\sum_{e_3=0}^\infty\sum_{e_4=0}^\infty \left(\prod_{k=1}^4 \alpha_k^{e_k}\right) z^{e_1+e_2+e_3+e_4}\\ &= \sum_{e_1=0}^\infty\sum_{e_2=0}^\infty\sum_{e_3=0}^\infty\sum_{e_4=0}^\infty \prod_{k=1}^4 (\alpha_k z)^{e_k}\\ &= \prod_{k=1}^4\sum_{e_k=0}^\infty (\alpha_k z)^{e_k} = \prod_{k=1}^4 \frac{1}{1 - \alpha_k z}\end{align} $$ Since the roots of $z$ in denominator of last expression ($\alpha_1^{-1},\alpha_2^{-1},\alpha_3^{-1}, \alpha_4^{-1}$) are distinct and simple, one can read off its partial fraction decomposition directly. The result is
$$\Lambda(z) = \sum_{k=1}^4 \frac{1}{1-\alpha_k z} \prod_{\ell=1,\ne k}^4 \frac{1}{1 - \alpha_\ell\alpha_k^{-1}} = \sum_{k=1}^4 \frac{\alpha_k^3}{1-\alpha_k z}\prod_{\ell=1,\ne k}^4 \frac{1}{\alpha_k - \alpha_\ell} $$ Expanding both sides and compare coefficients of $z^n$, one get
$$\begin{align} \Lambda_n &= \sum_{k=1}^4 \frac{\alpha_k^{n+3}}{\prod\limits_{\ell=1,\ne k}^n (\alpha_k - \alpha_\ell)}\\ &=\phantom{+} \frac{3^{n+3}}{(3-9)(3-27)(3-81)} + \frac{9^{n+3}}{(9-3)(9-27)(9-81)}\\ &\phantom{=} + \frac{27^{n+3}}{(27-3)(27-9)(27-81)} + \frac{81^{n+3}}{(81-3)(81-9)(81-27)}\\ &= \frac{-27\cdot 3^{n+3} + 39\cdot 9^{n+3} - 13\cdot 27^{n+3} + 81^{n+3}}{303264} \end{align} $$
As a doubt check, I have computed the first few $\Lambda_n$ by brute force
$$\Lambda_{1\ldots 6} = 120,10890,914760,74987451,6098153040,4946037697808153040$$
and above formula does produce the correct numbers.
Update
A web search indicate OEIS has recorded this sequence before (OEIS A226804). It also has a much simpler expression for $\Lambda_n$.
$$\Lambda_n = \frac{3^n(3^{n+1}-1)(3^{n+2}-1)(3^{n+3}-1)}{416}$$
Update 2
Playing around with an CAS, it seems above result can be generalized.
Instead of a 4-fold sum over $e_1,\ldots, e_4$ with $(\alpha_1,\ldots,\alpha_4) = (3, 3^2, 3^3, 3^4)$, we can consider a $p$-fold sum with $(\alpha_1,\ldots,\alpha_p) = (\alpha,\alpha^2,\ldots,\alpha^p)$. As far as I can test, we have $$ \sum_{\sum\limits_{k=1}^p e_k = n}\prod_{k=1}^p \alpha_k^{e_k} = \sum_{\sum\limits_{k=1}^p e_k = n}\alpha^{\sum\limits_{k=1}^p ke_k} = \alpha^n\prod_{k=1}^{p-1}\frac{\alpha^{n+k}-1}{\alpha^k-1} $$ This is a beautiful result
but I am unable to derive it from first principle. See Calvin Lin's answer for a derivation.