A man deposits ​$15,000 at the beginning of each year for 15 years in an account paying ​4% compounded annually. He then puts the total amount on deposit in another account paying 5​% compounded semiannually for another 13 years. Find the final amount on deposit after the entire 28​-year period.

Using the formula for the future value of an annuity, we can find the amount on deposit after 15 years:

FV = Pmt x ((1 + r)^n - 1) / r
where FV is the future value, Pmt is the annual payment, r is the interest rate per period, and n is the number of periods.

In this case, Pmt = $15,000, r = 0.04 (since it is compounded annually), and n = 15. So we have:

FV = 15000 x ((1 + 0.04)^15 - 1) / 0.04
FV = $336,778.87

This is the amount on deposit after 15 years. We can now use this as the principal (P) and find the future value after another 13 years at 5% compounded semiannually. The formula for this is:

FV = P x (1 + r/2)^(2n)
where FV is the future value, P is the principal, r is the interest rate per semiannual period, and n is the number of semiannual periods.

In this case, P = $336,778.87, r = 0.05/2 = 0.025, and n = 13 x 2 = 26. So we have:

FV = 336778.87 x (1 + 0.025)^26
FV = $657,276.24

Therefore, the final amount on deposit after the entire 28-year period is $657,276.24.