I have a question in the extended modelling part of my text book to do with annuities that have a repayment period and compounding period that are not equal. The exact question is below;

"A person deposited $2000 into a bank account on his 21st birthday. He deposited the same amount on each succeeding birthday, the lat deposit being when he turned 54. He closed the account on his 60th birthday.

How much did he receive if:

i) Interest has been at a rate of 8% p.a, compounded annually

ii) Interest has been at a rate of 8% p.a, compounded monthly."

As I understand it this messes up the equation for future value annuities as the compounding and repayment period must be equal for it to work.

I was thinking that the only way to do this would be with a spreadsheet, however is there an equation? If not what would I need to do in the spreadsheet to make sure I am getting right?

Thank you very much!