The formula for calculating the payment amount $P$ for a loan payment is well established:
$$B_n = A (1+i)^n - \frac{P}{i} [(1+i)^n - 1 ]$$
where $B_n$ the balance after $n$ payments, $A$ the principal and $i$ the interest charged monthly.
This formula calculates the balance assuming that nothing gets added to the remaining loan amount, only subtracted in form of $P$.
How would I need to adapt this formula if for each period, I add an additional $5000 to the remaining payment amount?