I don't recognize the formula you are using. It is similar to the
formulas I know, but yours has part that mine don't. There is also a
missing set of parentheses; but that might be just a mistake in how
you show the formula. (On the other hand, if you are using the
formula exactly as you show it, you will get a ridiculous answer.)
Let's start by estimating what a reasonable answer should be. If
there were no interest being charged, 80000 would be paid back in 16
installments of 5000 each. With the interest, a reasonable answer
would be somewhere between perhaps 20 and 30.
Here is the formula as you show it:
80000x1.04^n-1 = 5000 x 1(1.04^n-1)/1.04-1
I don't recognize the 'x1.04^n-1' on the left hand side; I will ignore
it for now. And the '1.04-1' on the right needs to be in parentheses.
Then we have a formula I recognize:
80000 = 5000 x 1(1.04^n-1)/(1.04-1)
Using variables instead of the specific numbers for your example, this
formula is
((1+i)^n-1)
P = A * -----------
(1+i)-1
or, simplified a bit,
((1+i)^n-1)
P = A * -----------
i
However, there is a big problem when we try to work the problem using
this formula. We get an answer of about 12.6, which is not reasonable.
The reason we get an unreasonable answer is that you are using the
wrong basic formula. This formula is for the case where you are
building value by contributing at a regular interval. 16
contributions of
5000 each makes 80000 without interest, if you are
getting interest, then reaching 80000 with only 12.6 contributions of
5000 each makes sense.
The formula for taking withdrawals from an existing account, or for
paying off a loans, is similar but with basic differences:
(1-(1+i)^-n)
P = A * ------------
(1+i)-1
or
(1-(1+i)^-n)
P = A * ------------
i
Compared to the other formula, this one has the two terms in the
numerator reversed (1 minus something, instead of something minus 1);
and the exponent is negative.
Plug the numbers for your example into this formula and you should get
an answer of a bit more than 26, which is reasonable.
You ask if this is a tricky question. Of course it is, if you don't
know what you are doing. But if you recognize which formula to use,
and if you know how to use logarithms to find the answer, then there
is nothing tricky about it. And like anything else, it gets easier
with experience.
And I'm not sure what your question about ar^(n-1) and ar^n means....
Perhaps you are asking about the difference between these two formulas
for building an account with regular contributions:
((1+i)^n-1)
P = A * -----------
i
and
((1+i)^n-1)
P = A * ----------- * (1+i)
i
or between these two corresponding formulas for withdrawing from an
existing account or for paying off a loan:
(1-(1+i)^-n)
P = A * ------------
i
and
(1-(1+i)^-n)
P = A * ------------ * (1+i)
i
The extra factor of (1+i) in both formulas is if the contributions or
withdrawals are at the beginning of the time period instead of at the
end. It takes less time to reach a goal if you are building an
account and make the first contribution right away; and it takes less
time to pay off a loan if you make the first payment right away.
I hope this helps. Please write back if you have further questions
about any of this.
If you are still not getting the right answer for your particular
problem, write back showing me the work you have tried to do. And
that means showing me the actual calculations -- not just describing
in words what you did.