# Thread: closed-form expression and induction

1. ## closed-form expression and induction

f(1) = 4
f(3) = f(1) + (3)^2 - 3 = 10
f(9) = f(3) + (9)^2 - 3 = 88
f(27) = f(9)+ (27)^2 - 3 = 814
f(81) = f(27) + (81)^2 - 3 = 7373

I failed to find the pattern . can anyone help?

2. ## Re: closed-form expression and induction

\begin{align*}f(3^0) & = 4 \\ f(3^1) & = 4 + 3(3^1-1) \\ f(3^2) & = 4 + 3(3^1-1) + 3(3^3-1) \\ & = 4 + 3(3^1 + 3^3 - 2) \\ f(3^3) & = 4 + 3(3^1 + 3^3 - 2) + 3(3^5 - 1) \\ & = 4 + 3(3^1 + 3^3 + 3^5 -3)\end{align*}

In general, it appears that for $k \ge 0$:
$f(3^k) = 4 + 3\sum_{n = 1}^k\left(3^{2n-1}-1\right) = 4 + \dfrac{9}{8}(9^k-1)-3k$