Here are two ways of investing $30,000 for 20 years:

Periodic Deposit
$1,500 at the end of each year

Rate
5% compounded annually

Time
20 years

To calculate the future value of an investment with periodic deposits, a compounded interest rate, and a specific time period, you can use the formula for the future value of an ordinary annuity.

The formula for the future value of an ordinary annuity is:

FV = P * [(1 + r)^n - 1] / r

Where:
- FV is the future value of the annuity (the final amount you will have after 20 years)
- P is the amount of each periodic deposit ($1,500 in this case)
- r is the interest rate per period (5% per year in this case)
- n is the total number of periods (20 years in this case)

Let's calculate the future value step by step:

1. Calculate the future value of each deposit at the end of each year:
Year 1: Deposit of $1,500 * (1 + 0.05)^20 = $1,500 * 1.05^20 = $1,500 * 2.653297705 = $3,979.95
Year 2: Deposit of $1,500 * (1 + 0.05)^19 = $1,500 * 1.05^19 = $1,500 * 2.513839643 = $3,770.76
...
Year 20: Deposit of $1,500 * (1 + 0.05)^1 = $1,500 * 1.05^1 = $1,500 * 1.05 = $1,575

2. Sum up all the future values of each deposit:
FV = $3,979.95 + $3,770.76 + ... + $1,575

To find the sum of these values, you can use the formula for the sum of a geometric series:

Sum = (first term * (1 - common ratio^n)) / (1 - common ratio)

Where:
- First term is the first future value ($3,979.95 in this case)
- Common ratio is the ratio between consecutive terms (1.05 in this case)
- n is the total number of terms (20 in this case)

3. Calculate the sum of the future values:
Sum = ($3,979.95 * (1 - 1.05^20)) / (1 - 1.05)
= ($3,979.95 * (1 - 3.050330086)) / (-0.05)
= ($3,979.95 * (-2.050330086)) / (-0.05)
= $8,155.81

Therefore, if you invest $1,500 at the end of each year with a 5% interest rate compounded annually for 20 years, the future value of your investment would be approximately $8,155.81.