What would mortgage payments be if monthly payments were constant in real terms? From the Wikipedia:

The fixed monthly payment for a fixed rate mortgage is the amount paid
by the borrower every month that ensures that the loan is paid off in
full with interest at the end of its term. The monthly payment formula
is based on the annuity formula. The monthly payment c depends upon:
r - the monthly interest rate, expressed as a decimal, not a percentage. Since the quoted yearly percentage rate is not a
compounded rate, the monthly percentage rate is simply the yearly
percentage rate divided by 12; dividing the monthly percentage rate by 100 gives r, the monthly rate expressed as a decimal.
N - the number of monthly payments, called the loan's term, and
P - the amount borrowed, known as the loan's principal.
In the standardized calculations used in the United States, c is given by the formula:
$$c = \begin{cases}
  \frac{r P}{1-(1+r)^{-N}} = \frac {rP(1+r)^N}{(1+r)^N-1}, &amp; r\ne 0; \\
  \frac{P}{N}, &amp; r = 0.
\end{cases}$$

The &quot;issue&quot; with this monthly payment schedule is that, if inflation is positive, the amount you pay in real terms the first year is more than the amount you pay the last year. Assuming constant inflation $\pi$, what would the monthly payment formula look like if it had to be constant in real terms?
Note most of the argumentation adapts off the standard derivation for constant nominal payments from Wikipedia.

Let us assume $c$ is a yearly payment for the sake of simplicity. Consider how much is left to be repaid after each year. The principal remaining after the first year is $P_1=(1+r)P-c$. That is, the initial amount plus interest less the payment. After the second year $P_2=(1+r) P_1 - c$ is left, so $P_2=(1+r)((1+r)P-c)-c(1+\pi)$. Note we need to pay $c(1+\pi)$ instead of $c$ so that we are still paying $c$ in real terms for the second year. If the whole loan was repaid after two years, $P_2=0$, so $P = \frac{c}{1+r}+\frac{c(1+\pi)}{(1+r)^2}$.

This equation generalizes for a term of $n$ years, $$P = \frac{c}{1+r} \sum_{k=0}^{n-1} \frac{(1+\pi)^k}{(1+r)^k}$$. This is a geometric series which has the sum
$P=\frac{c}{1+r}\left(\frac{1-\frac{1+\pi}{1+r}^n}{1-\frac{1+\pi}{1+r}}\right)$
which can be rearranged to give $$c=\frac{P(1+r)}{\left(\frac{1-\frac{1+\pi}{1+r}^n}{1-\frac{1+\pi}{1+r}}\right)}$$. The nominal payment for year $n$ will be $c(1+\pi)^{(n-1)}$.