Here is an Excel table that I made: fund.xls.

Code:

Year Balance Interest
1 $4,000.00 0.06
2 $8,240.00 0.07
3 $12,816.80 0.07
4 $17,713.98 0.07
5 $22,953.95 0.08
6 $28,790.27 0.08
7 $35,093.49 0.08
8 $41,900.97 0.08
9 $49,253.05 0.08
10 $57,193.29 0.08
11 $65,768.76 0.08
12 $75,030.26 0.08
13 $85,032.68 0.08
14 $95,835.29 0.08
15 $107,502.12 0.08
16 $120,102.28 0.08
17 $133,710.47 0.08
18 $148,407.31 0.08
19 $164,279.89 0.08
20 $181,422.28 0.08
21 $199,936.06 0.08
22 $219,930.95 0.08
23 $241,525.42 0.08
24 $264,847.46 0.08
25 $290,035.25 0.08
26 $313,238.07 0.08

The second column contains the balance $\displaystyle b_n$ at the beginning of year $\displaystyle n$. The third column contains the interest rate $\displaystyle r_n$ used at the end of year $\displaystyle n$. Then $\displaystyle b_1=4,000$ and

$\displaystyle b_{n+1}=

\begin{cases}

b_n(1+r_n)+4,000, & n< 25\\

b_{25}(1+r_{25}), & n=25

\end{cases}

$ and $\displaystyle r_{n}=

\begin{cases}

8\%, & b_n\ge 20,000\\

7\%, & 5,000\le b_n<20,000\\

6\%, & \mbox{otherwise}

\end{cases}

$