Hi,

I have the following expression:

$\displaystyle

\begin{array}{cclclclclcl}

= & & 2^{k-2} \\

& + & 2^{k-3} & + & 2^{k-3} \\

& + & 2^{k-4} & + & 2^{k-4} & + & 2^{k-4} \\

& \vdots \\

& + & 2^1 & + & 2^1 & + & \dots & + & 2^1 \\

& + & 2^0 & + & 2^0 & + & \dots & + & 2^0 & + & 2^0 \\

\end{array}

$

It is set inside an array because of the + alignment. I would like to add underbraces under the two bottom rows, such as this:

$\displaystyle

+ \quad \underbrace{2^1 \quad + \quad 2^1 \quad + \quad \dots \quad + \quad 2^1}_{k-2}

$

$\displaystyle

+ \quad \underbrace{2^0 \quad + \quad 2^0 \quad + \quad \dots \quad + \quad 2^0 \quad + \quad 2^0}_{k-1}

$

However, I would still like to retain the vertical alignment of all the + signs in all rows, so I need to somehow put these underbraces inside the array. (Or use array inside an array, but I can't figure exactly how.)

Do you know any way to do this? Thanks!