I have a perfect binary tree that I wish to write the generic formula for. There are $1,2,4,8, ...$ nodes per splitting (as usual). Each node is unique. The equations for the first four rows can be written as
$$ \begin{align} 1&\\ A^{(1)}x +& B^{(1)}y\\ A^{(1)}(A^{(2)}x + B^{(2)}y) +& B^{(1)}(A^{(2)}x+B^{(2)}y)\\ A^{(1)}(A^{(2)}(A^{(3)}x+B^{(3)}y) + B^{(2)}(A^{(3)}x +B^{(3)}y)) +& B^{(1)}(A^{(2)}(A^{(3)}x+B^{(3)}y) + B^{(2)}(A^{(3)}x+B^{(3)}y))\\ &\vdots \end{align} $$ The $x$ and $y$ variables are just place holders to insert the next layer. Each place is now a unique node in the perfect binary tree. Is there a way to write the equation for the $n$th layer?