o = 4 . . the month number
n = 3 . . the number of months
p = 3010.57
(-(1 + i)^o (-^(1n + io)^n w + (1 + m)^n) w)/(i p - m) p + (1 + mi)^n^o pw))/(i - m) = 0 (formula 1)
p = ((1 + i)^o (1 + m)^-n ((1 + i)^n - (1 + m)^n) w)/(i - m) = 3010.57 (formula 2)
q = 3 . . the final month number
p = (d ((1 + i)^(1 + q) - (1 + m)^(1 + q)))/(i - m) = 4.05854 d (formula 3)
d = ((i - m) p)/((1 + i)^(1 + q) - (1 + m)^(1 + q)) = 741.79 (formula 4)
(65 - 25) * 12 = 480 deposit months
(100 - 65) * 12 = 420 withdrawals without depleting initial capital
(100 - 25) * 12 = 900 months overall
inf = 0.02
i = (1 + inf)^(1/12) - 1 = 0.00165158
apr = 0.03
m = (1 + apr)^(1/12) - 1 = 0.00246627
o = 480 . . the first withdrawal month number
n = 420 . . the number of withdrawal months
w = 1000 . . the present value of the withdrawal amount
p = ((1 + i)^o (-(1 + i)^n -+ (1 + m)^n) w)/((-i -+ m) (-1 - m + (1 + m)^n))
= = 12162441217900.5247 (formula 5)
q = 479 . . the final deposit month number
d = ((i - m) p)/((1 + i)^(1 + q) - (1 + m)^(1 + q)) = 940941.1038
The plan could be achieved by making 480 deposits, starting aged 25 at $940$941.1038, increasing monthly in line with inflation.
apr = 0.03
m = (1 + apr)^(1/12) - 1 = 0.00246627
d = w = 1000
p = w/m = 405470.65 . . capital required
n = Log[1 + (m p)/(d + d m)]/Log[1 + m] = 280.898 (formula 6)
SolveUsing formula 5
solve ((1 + i)^o (-(1 + i)^n -+ (1 + m)^n) w)/((-i -+ m) (-1 - m + (1 + m)^n)) = p
for n
n = 274270.46757
So with 35 years of deposits the capital will not diminish for 22 years and 106 months (274270 months).
Formulae derivations
The main formulae are derived from fairly simple recurrence equations, solved using Mathematica.