Under an effective interest rate of 5%, the sum of the present value of an annuity which pays $4 at the end of each period for n periods and the present value of a unique payment of $100 at the end of the nth period is equal to the sum of the present value of an annuity that pays $3 at the end of each period for n periods and the present value of a unique payment of $180 at the end of the nth period. Find n.