Math please help!
posted by Amy .
invested 2000
gains 0.2 every odd numbered month
gains 0.15 every even numbered month
write function for n months?
i've tried solving this with a formula, but every formula i come up with is wrong.
Could someone tell me how to solve this and plug in the right numbers into a formula?

For the first five months algebrically i got:
1: 2400
2: 2040
3: 2448
4: 2080.8
5: 2496.96
i tried using this formula:
2000(1+0.2)^n
when i plugged in 1 for n i got 2400.
however, when i plugged in 2 for n i got 2880. which isn't right.
so i changed the formula to 2040(1+ .2)^1 I got the right answer
but is there a simple formula where i can just plug in the "n" and get the right amount? 
Is there one formula where i can get the answer to any month?