What function $f(n)$ is defined by $f(1)=2$ and $f(n+1)=2f(n)$ for $n\geq 1$ I have to 2 qusetions in a mathematical induction homework:

1-What function $f(n)$ is defined by $f(1)=2$ and $f(n+1)=2f(n)$ for $n\geq 1$

My attempt:
$f(1)=2$
$f(2)=2f(1)=2(2)=2^2$
$f(3)=2f(2)=2(2^2)=2^3$
$f(4)=2f(3)=2(2^3)=2^4$
.
.
.
Thus, and from the second form of mathematical induction
$f(n)=2^n$
is that true?

2-If $g$ is defined by $g(1)=2$ and $g(n)=2^{g(n-1)}$, for all $n\geq 2$ what is $g(4)$.

My attempt:
$g(1)=2$
$g(2)=2^{g(2-1)}=2^{g(1)}=2^2=4$
$g(3)=2^{g(3-1)}=2^{g(2)}=2^4=16$
$g(4)=2^{g(4-1)}=2^{g(3)}=2^{16}=65536$
But I don't use the mathematical induction here?
Thanks.

For the first one, you are correct. $f(n)=2^n$. You still have to prove that $f(n)=2^n$, but you are on the right track.

For the second one, if you only need to calculate $g(4)$, you are done. If you need a more general expression of $g(n)$ think about it this way:
$$g(4)=2^{g(3)} = 2^{2^{g(2)}} = 2^{2^{2^{2}}}$$ so $g(4)$ is a "power tower" of height $4$.
