Home » Blog » Determine the convergence or divergence of f(n) = n(-1)n

Determine the convergence or divergence of f(n) = n(-1)n

Consider the function f(n) defined by

    \[ f(n) = n^{(-1)^n}. \]

Determine whether the sequence \{ f(n) \} converges or diverges, and if it converges find the limit.


The sequence \{ f_n \} diverges.
Proof. Suppose otherwise, that there exists a real number L and a positive integer N such that

    \[ |f(n) - L| < \varepsilon \qquad \text{for all } \varepsilon > 0, \quad \text{for all } n > N. \]

Since N is positive, we know 2N > N and 2N+1 > N. So,

    \begin{align*}  && |f(2N) - L| &< \frac{1}{2} & \text{and} && |f(2N+1) - L| &< \frac{1}{2} \\[9pt]  \implies && |2N-L| &< \frac{1}{2} & \text{and} && \left|\frac{1}{2N+1} - L\right| &< \frac{1}{2} \\[9pt]  \implies && && && \left| L - \frac{1}{2N+1} \right| &< \frac{1}{2}. \end{align*}

Then,

    \begin{align*}   && |2N - L| + \left| L - \frac{1}{2N+1} \right| &< 1 \\[9pt]  \implies && \left| 2N - \frac{1}{2N+1} \right| &< 1 \\[9pt]  \implies && 2N - \frac{1}{2N+1} &< 1 &(\text{since } 2N - \frac{1}{2N+1} > 0) \\[9pt]  \implies && 2N - \frac{1}{2N} &< 1 \\[9pt]  \implies && 2N - 1 &< 1 \\[9pt]  \implies && 2N & < 2 \\[9pt]  \implies && N &< 1. \end{align*}

This contradicts that N is a positive integer (since there are no positive integers less than 1). Hence, \{ f_n \} must diverge. \qquad \blacksquare

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):