Is there a complex variant of Möbius' function? When you're dealing with arithmetic functions, you might have come across the classical Möbius' function
$$
\mu(n)=\begin{cases} (-1)^{\omega(n)}=(-1)^{\Omega(n)} &\mbox{if }\; \omega(n) = \Omega(n)\\ 0&\mbox{if }\;\omega(n) < \Omega(n).\end{cases},
$$
where
$ω(n)$ is the number of distinct primes dividing the number $n$ and
$Ω(n)$ is the number of prime factors of $n$, counted with multiplicities.
Is there a complex analogon $\mu^{\Bbb C}(z)$ that additionally takes into account that primes of the form $z=4n+1$ might be factored as well, e.g. $5=(1+2i)(1-2i)$?
So a number $z_n$ that contains a prime of that form would give 


*

*$\mu^{\Bbb C}(z_n)=0$, when think of e.g. $5=(1+2i)(1-2i)$ as a square

*or $\mu^{\Bbb C}(z_n)=1$ when think of it as product of two Gaussian primes.


A more general question, but I'm not sure how this is related, is:
How does the concept of factoring natural numbers carry over to complex natural numbers?
Anything to read on that topic would be nice...
 A: There is slight trouble with choice of unit, using ideals instead of Gaussian primes as factors resolves this.
As always the Möbius function encodes the inclusion-exclusion principle.
To invert $$F(\mathfrak n) = (f*1)(\mathfrak n) = \sum_{\mathfrak d|\mathfrak n} f(\mathfrak d)$$ we will use $$\mu(\mathfrak p_1^{r_1} \mathfrak p_2^{r_2} \cdots \mathfrak p_k^{r_k}) = \begin{cases} (-1)^{k} \; \text{ when each $r_i=1$} \\ 0 \; \text{ otherwise}\end{cases}.$$
Then simplifying a bit $$(F*\mu)(\mathfrak p_1^{r_1} \mathfrak p_2^{r_2} \cdots \mathfrak p_k^{r_k}) = \sum_{\epsilon = \{0,1\}^k} (-1)^{\epsilon_1 + \epsilon_2 + \cdots + \epsilon_r} F(\mathfrak p_1^{r_1-\epsilon_1} \mathfrak p_2^{r_2-\epsilon_2} \cdots \mathfrak p_k^{r_k-\epsilon_k}) = f(\mathfrak p_1^{r_1} \mathfrak p_2^{r_2} \cdots \mathfrak p_k^{r_k}).$$
It may be worth checking that we get the same correspondence with Dirichlet series/zeta functions as in the natural numbers case.
A: The Mertens function, or summatory function of the Moebius function, $M(x) := \sum_{n \leq x} \mu(n)$ can be extended to all $x \in \mathbb{C}$ with $\Re(x) > 0$ via an inverse Mellin transform of the zeta function: 
$$M(x) = \frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty} \frac{x^{s}}{s\zeta(s)} \, ds, c > 0, c \in \mathbb{R}.$$ 
In general, one obtains by contour integration with the residue theorem that for $x > 0$ 
$$M(x) = \sum_{\substack{\rho \\ \zeta(\rho) = 0 \\ \Im(\rho) > 0}} \left( \frac{x^{\rho}}{\rho \zeta^{\prime}(\rho)} + \frac{x^{\bar{\rho}}}{\bar{\rho} \zeta^{\prime}(\bar{\rho})}\right) + R(x) + \sum_{n \geq 1} \frac{(-1)^{n-1} (2\pi / x)^{2n}}{n \cdot (2n)! \zeta(2n+1)}, $$ 
where $R(x) = -2$ if $x$ is not an integer and $R(x) = -2 + \frac{1}{2} \mu(x)$ if $x \in \mathbb{Z}$ (see Hurst 2017). Note that the rightmost series is rapidly convergent so that the dominant order of growth comes from the terms of the non-trivial zeros of the Riemann zeta function. 
You can then extend your complex-valued Moebius function to all complex $x$ with $\Re(x) > 0$ by defining $\mu^{\ast}(x) := M(x) - M(x-1)$. This definition is less combinatorial than some of the other suggestions above, but nonetheless provides a concrete analytic foundation for the requested generalization.
