M BUZZ CRAZE NEWS
// updates

Sequence of alternating $0$'s and $1$'s in terms of $i$?

By Sarah Rodriguez
$\begingroup$

How to redefine the function $f(n) = \begin{cases} 1, & \text{if $n$ is even} \\ 0, & \text{if $n$ is odd} \end{cases}$ in terms of arithmetic operations using ⅈ?

$\endgroup$ 3

2 Answers

$\begingroup$

The function $g(n)=i^{2n}$ maps even values to $+1$ and odd values to $-1$.

So you just need a function $h(n)$ such that:

  • $h(+1)=1$
  • $h(-1)=0$

This function is pretty simple: $h(n)=\dfrac{n+1}{2}$.

Now you just need to construct the function $f(n)=h(g(n))=\dfrac{i^{2n}+1}{2}$.


UPDATE:

Your piecewise function is from $\mathbb{N}$ to $\mathbb{N}$, so clearly there is no need to "involve" $\mathbb{C}$ here.

As implied by @columbus8myhw in the comment-thread below, $i^{2n}=(i^2)^n=(-1)^n$.

Therefore, you might as well use $f(n)=\dfrac{(-1)^n+1}{2}$.

$\endgroup$ 8 $\begingroup$

$f(n) = \dfrac{1^n + (-1)^n}{2} = \dfrac{i^{4n} + i^{2n}}{2}$

$\endgroup$ 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy