express $1+\frac{(-1)^n}{n}$ in terms of other functions

84 Views Asked by At

Suppose a sequence $(a_n)$ is defined as $a_n=1+\frac{(-1)^n}{n}$ for $n \geq 1$. I want to plot these points on a desmos graphing calculator.

However, the calculator does not accept $(-1)^n$, as it does not display any graph after I key in.

Question: Is it possible to express $a_n$ in terms of modulus or other functions so that it can be shown in the calculator?

1

There are 1 best solutions below

3
On BEST ANSWER

Replace $n$ by $\lfloor x\rfloor$ in both places and you'll get the graph you want, I think.