returnRate = 0.08;

ngdpGrowthRate = 0.05;

dividendPayoutRate = 0.04;

taxTake[i_]:=(((1 + ngdpGrowthRate))^i)

eoy[-1]=0

eoy[0]=1;

eoy[i_]:=(eoy[i-1])((1+returnRate)-dividendPayoutRate)+taxTake[i]

ret[-1]=0;

ret[0]=0;

ret[i_]:=eoy[i-1]returnRate

raisedFromPriorTaxes[i_]:=ret[i-1](1+ngdpGrowthRate)+taxTake[i]

newTaxNeeded[i_]:=(taxTake[i]+eoy[i-1](returnRate))-raisedFromPriorTaxes[i]

Table[{i,eoy[i],ret[i], taxTake[i]+ret[i],raisedFromPriorTaxes[i], newTaxNeeded[i], ((newTaxNeeded[i])/(((1+ngdpGrowthRate))^i))},{i,0,30}]//TableForm

cumulativeIncrementalTaxes[n_]:=(∑_(i=0)^n)newTaxNeeded[i](((1+ngdpGrowthRate))^(n-i))

Table[{i,cumulativeIncrementalTaxes[i],taxTake[i]},{i,0,30}]//TableForm