Solve for n A=P(1+nr)