This is possibly a dumb question: inside a function, I first define
Rho = Table[xrho[m], {m, 1, k}]
then populate it using
Do[xrho[d] = q1^i q2^j; d++, {i, 1, Length[p]}, {j, 1, Length[p[[i]]]}]
and then update its value such that I can call it later inside the function
RhoTrue = Table[xrho[m], {m, 1, k}]
This works but seems dumb: is there a way to directly define it in therms of the other two (or more) counting variables?