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 ⅈ?
2026-04-25 05:32:38.1777095158
Sequence of alternating $0$'s and $1$'s in terms of $i$?
3.9k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
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:
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}$.