Superscript Failed to Code

Hi everyone,

I’m using mathematica and trying to generate a sequence with double superscripts (or subscripts). I’m new to Mathematica and don’t know how to make the output display correctly… Hope I can find some help here, thanks in advance!

The problem is that when the range of second superscript depends on the first, the output never codes correctly… e.g.
input:

Sum[Superscript[G, a, b], {a, 1, 3}, {b, 1, 2^a}]

output:

Superscript[G, 1, 1] + Superscript[G, 1, 2] + Superscript[G, 2, 1] + 
 Superscript[G, 2, 2] + Superscript[G, 2, 3] + Superscript[G, 2, 4] + 
 Superscript[G, 3, 1] + Superscript[G, 3, 2] + Superscript[G, 3, 3] + 
 Superscript[G, 3, 4] + Superscript[G, 3, 5] + Superscript[G, 3, 6] + 
 Superscript[G, 3, 7] + Superscript[G, 3, 8]

Any idea on how to make the ‘Superscript[G, i,j]’ function really work?

Thanks!
Helene

The second iterator is the inner iterator.

In[3]:= Table[{i, j}, {i, 3}, {j, 2}]

Out[3]= {{{1, 1}, {1, 2}}, {{2, 1}, {2, 2}}, {{3, 1}, {3, 2}}}