# What is $\varphi(0)$? [duplicate]

$\varphi$ is Euler's totient function. My question is:

• When/if $\varphi$ is defined at $0$, what is it usually defined as?

• Is there a "most natural" or more commonly accepted definition of $\varphi(0)$?

This is a soft question, because it's of course a matter of convention.

Here are three possible definitions, with some justification.

Definition 1: $\boldsymbol{\varphi(0) = 2}$. Note that for $n \ge 1$, $\varphi(n) = \left| \left( \mathbb{Z} / n \mathbb{Z} \right)^* \right|$, the number of units mod $n$. Plugging in $n = 0$, we get $$\varphi(0) = \left| \left( \mathbb{Z} / 0 \mathbb{Z} \right)^* \right| = \left| \left( \mathbb{Z} \right)^* \right| = \left| \{-1, 1\} \right| = 2.$$

Definition 2: $\boldsymbol{\varphi(0) = 0}$. If $a \mid b$, then $\varphi(a) \mid \varphi(b)$. To preserve this property for $b = 0$, we need that $\varphi(a) \mid \varphi(0)$ for all $a$, implying $\varphi(0) = 0$.

WolframAlpha returns $\varphi(0) = 0$. However, the Wolfram Math World page explains:

By convention, $\phi(0)=1$, although the Wolfram Language defines EulerPhi[0] equal to 0 for consistency with its FactorInteger[0] command.

which gives us

Definition 3: $\boldsymbol{\varphi(0) = 1}$. Does anyone know the reason for this convention?

## More observations

• Any choice of $\varphi(0)$ is consistent with the multiplicativity of $\varphi$.

• $\varphi(mn) = \varphi(m) \varphi(n) \frac{d}{\varphi(d)}$, where $d = \gcd(m,n)$, implies $\varphi(0) = 0$. This supports definition 2.

• If $\varphi(n) = \sum_{ab = n} a \mu(b)$, then note that when $ab = 0$, $a = 0$ or $b = 0$, and since $\mu(0) = 0$, $a \mu(b) = 0$. So this is $\sum 0 = 0$, again agreeing with definition 2.

## marked as duplicate by egreg, Claude Leibovici, vonbrand, Macavity, wythagorasAug 25 '15 at 16:33

• In what situation would one want to evaluate the Euler $\varphi$ function at $0$? – Pete L. Clark Aug 23 '15 at 1:46
• @PeteL.Clark I guess that is part of the question. Maybe the correct answer is, "defining $\varphi(0)$ is not useful in any context I know of." – 6005 Aug 23 '15 at 1:56
• @BarryCipra Thanks for the link with very relevant answers. I will let others judge if this is a duplicate. – 6005 Aug 23 '15 at 1:57

$\varphi(n)$ is the number of positive integers not larger than $n$ that are coprime to $n$.
There are no positive integers not larger than $0$, so by definition, if we were to define $\varphi(0)$, we would want it to equal $0$. This agrees with $$\varphi(n)=n\prod_{\text{prime} \ p\lvert n} \left(1-\frac{1}{p} \right),$$ where the product runs over all the primes, when $n=0$. We may indeed note that we cannot deduce from this the infinitude of the primes, since in any finite case the product is smaller than $1$, and is thus nullified by $n=0$.
• (+1) Another good argument for definition 2--the product form of $\varphi(n)$ is particularly convincing. But then I'm still puzzled by Wolfram Math World's "By convention" statement. – 6005 Aug 23 '15 at 1:40
• Maple also give us the value $0$. – GEdgar Aug 23 '15 at 1:44
• But Pete Clark raised an important point: defining $\varphi(0)$ is completely useless. There is never any reason you need such a definition. This is different from the case of defining $n!$ at $n = 0$. – KCd Aug 23 '15 at 2:45
• @KCd: Well, we define $1$ not to be prime just for convenience, don't we? In particular, it should be because we want to avoid saying "except for" in statements of various prime theorems, especially the Fundamental Theorem of Arithmetic. The situation here is similar, I think. – Vincenzo Oliva Aug 23 '15 at 19:39