Let $f_n: D \rightarrow \mathbb{R}: f_n(x) = g(x)^n, n≥1$. Necessary and sufficient conditions such that $f_n$ converges? The Assignment:

Let $D := [a,b]$ with $a<b$ and $g: D \rightarrow \mathbb{R}$ be continuous. Observe the sequence of functions $f_n: D \rightarrow \mathbb{R}: f_n(x) = g(x)^n, n≥1$. List and explain necessary and sufficient conditions such that $f_n$ converges (a) pointwise and (b) uniformly.

What I've gathered so far is that, $|g(x)|<1$ is necessary, $ g(x) = 1$ would be sufficient for both pointwise and uniform convergence. I also don't know where the continuity of $g$ actually matters.
Any help would be appreciated
 A: Your conditions on $g$ are also necessary, since of $|g(x)|>1$ for some $x\in[a,b]$ then the sequence $(f_n(x))$ does not converge. You may also let $g(x)=1$,for some (or all) $x$ for guarantee pointwise convergence
For uniform convergence, if $M$ is the maximum of $|g|$ on the interval (which exists because it is compact), you may require that $M<1$: in this case, $f_n\to 0$ as $n\to \infty$ so, given $\varepsilon>0$,
$$
|f_n(x)|=|g(x)|^n\leq M^n<\varepsilon
$$
If $n$ is large enough. Note that this is valid for every $x$ in the domain, so the convergence is uniform.
If $M=1$, I'm going to show that the convergence is not uniform. Let $c\in[a,b]$ be such that $|g(c)|=M$. You can take a sequence $(x_n)$ of points such that $x_n\to c$. By continuity, the sequence $(|g(x_n)|)$ will converge to $1$. 
If $m\in\mathbb{N}$, then there's a $x_{n_m}$ in the sequence such that $|g(x_{n_m})|>\tfrac{1}{2^{1/m}}$
 This follows from the fact that $\lim\limits_{n\to\infty}|g(x_n)|=1$ so we can get as closer as we want to 1 and since $\tfrac{1}{2^{1/m}}<1$, the sequence will eventually be greater than $\tfrac{1}{2^{1/m}}$ and we can let $x_{n_m}$ be one of those numbers that satisfies this. By this way we can construct a subsequence $(x_{n_m})$ such that $|f_m(x_{n_m})|=|g(x_{n_m})|^m\geq 1/2$. Note that this imply that the convergence is not uniform, because if we take $0< \varepsilon<1/2$ then you can not find an $N\in\mathbb{N}$ such that $n\geq N$ imply $|f_n(x)|<\varepsilon$ for all $x\in[a,b]$ since there's always and $m>N$ such that $|f_m(x_{n_m})|\geq 1/2>\varepsilon$.
Briefly: if the maximum of $g$ is less than 1, there's uniform convergence, if not, there's no uniform convergence (and maybe not even pointwise convergence).
