It is a bit hard to decipher the meaning of variables from what you said, but it looks like someone just tried to create the table for the \$100 loan with fixed annual interest rate $r$ (from 2% to 3%) compounded continuously that is paid off in $n$ months with equal monthly payments at the end of each month.
The underlying mathematics is very simple. Continuous compounding merely means that, if you do nothing, your initial debt $D$ grows exponentially in time according to the law $D(t)=e^{rt}$ where $r$ is the annual interest rate (in absolute units, so what we call $2\%$ means $r=0.02$, say) and $t$ is time in years. Switching to months (month=$\frac 1{12}$ of a year, we see that if your debt by the end of the $k-th$ month was $D_k$, it will be $e^{r/12}D_k$ by the end of the $k+1$-st month. If you make a payment $p$ at the end of the month, it is properly reduced by $p$, so the recursion is (the starting loan date can be viewed as the end of the $0$-th month)
$$
D_0=D,\qquad, D_{k+1}=e^{r/12}D_k-p
$$
The recurrence relation can be rewritten as
$$
e^{-(k+1)r/12}D_{k+1}=e^{-kr/12}D_k-e^{-(k+1)r/12}p
$$
or
$$
e^{-(k+1)r/12}p=e^{-kr/12}D_k-e^{-(k+1)r/12}D_{k+1}\,.
$$
Adding over $k=0,\dots,n-1$, taking into account that $D_n=0$ (which means that the debt is paid in full by the end of the $n$-th month), summing the geometric progression on the left and telescoping the sum on the right (I assume that the 21-st century kindergartner knows that $\sum_{k=0}^{n-1}q^k=\frac{1-q^n}{1-q}$ and that $(a_0-a_1)+(a_1-a_2)+\dots+(a_{n-1}-a_n)=a_0-a_n$ or there has really been no progress in child mathematical education for the last 2 centuries despite pouring millions of dollars into various "education reforms"), we get
$$
\frac{1-e^{-rn/12}}{e^{r/12}-1}p=D_0-0=D\,.
$$
Thus,
$$
p=D\frac{e^{r/12}-1}{1-e^{-rn/12}}
$$
for the monthly payment.
The total payment $P$ is $np$ and the total charge is
$$
P-D=D[n\frac{e^{r/12}-1}{1-e^{-rn/12}}-1]\,.
$$
That is your formula (with $D=100$, $r=0.02,0,0225,0.025,0.0275,0.03$ and $n=1,2,3,4,5$ and the values in the table (in dollars) rounded to the nearest cent according to the common rounding rules).
Feel free to ask any questions if anything is unclear.