I would like to start with a principal amount (P) in year 0, then add compound interest (C) to it for year 1, and then add that total value to the starting amount. So for example:
P=1000 C=2.5%
For three years growth, the outputs would be:
Year 0 1000.00
Year 1 2025.00 1000+(1000*1.025)
Year 2 3075.63 1000+(1000*1.025)+(1000*1.025*1.025)
Year 3 4152.52 1000+(1000*1.025)+(1000*1.025*1.025)+(1000*1.025*1.025*1.025)
What would the mathematical formula be for that please?
That would be the future value of an annuity.
You receive $\$1000$ each year, and you invest the proceeds at $2.5\%.$ How much do you have at the end of $n$ years?
$\sum_\limits{k=1}^n 1000(1.025)^k$
That is a geometric series and we have a formula for that.
$\sum_\limits{k=1}^n 1000(1.025)^k = 1000\frac {1.025(1.025^n-1)}{1.025-1}$