Following
@hutchphd's post #25 which recommends using induction:
We know that for one level, it is trivially true. 1/1 (=100%) is the right opacity for one level. For opacities, we will use fractions instead of percentages (e.g. 100%=1, 50%=1/2, 33%=1/3, 25%=1/4, 20%=1/5, etc.)
Suppose that for n levels, we have that our method gives opacities of 1/n equally for each level. Call it the ##mergedNLowerLevels = 1/nL_n+1/nL_{n-1}+...+1/nL_1 = 1/n(L_n+L_{n-1}+...+L_1)##.
(Example of 5 levels: ##1/5L_5 + 1/5L_4 + 1/5L_3 +1/5L_2 + 1/5L_1 = 1/5(L_5+L_4+L_3+L_2+L_1)## call this the ##merged5LowerLevels##)
Now let's add one more level, ##L_{n+1}##
(Example add level ##L_6##).
Our method is to give an opacity of 1/(n+1) to the new level, ##L_{n+1}##, and n/(n+1) to the ##mergedNLowerLevels##
##1/(n+1)L_{n+1} + n/(n+1) (mergedNLowerLevels)##
(Example: ##1/6L_6 + 5/6 (merged5LowerLevels)##).
Because we supposed that the method worked for that merging of n lower levels, we have
##mergedNLowerLevels = 1/n(L_n + L_{n-1} + ... + L_1)##
(Example: ##merged5LowerLevels=1/5(L_5 + L_4 + L_3 +L_2 + L_1)## )
So with the new level we have ##1/(n+1)L_{n+1} + n/(n+1)(1/n(L_n + L_{n-1} + ... + L_1))##
(Example ##1/6L_6 + 5/6(1/5(L_5+L_4+L_3+L_2+L_1)## )
Canceling the ##n## multiplier with the ##1/n## gives ##1/(n+1)(L_{n+1}+L_n+L_{n-1}+...+L_1)##
(Example: Canceling the 5's in ##5/6(1/5 ...)## gives ##1/6(L_6+L_5+...+L_1)##
So our method gives equal opacities with the added level.
With this, we know that our method works for 1, 2, ..., n and n+1 and then n+2 and then n+3, ... all the way up to any number of layers.