I get weird numbers. Can you provide an Open Document Spreadsheet with an example?
I did the calculation with some real numbers and included the output of an excel spreadsheet.
Yep, I get the same numbers.
The only thing that still concerns me though is that the lender needs to get (1+i)*(1+d) return on his investment, yet this calculates each k outstanding balance to be paid off as just Bal*(1+i)...