What is $0^0\pmod p$?

165 Views Asked by At

Assuming the combinatorial interpretation or the set-theoretic interpretation of natural number exponents, $0^0$ is not undefined, because we can reason that $0^0 \equiv 1 \pmod{p}$.

Obviously, the following congruence is incorrect though. Can you please help me understand where exactly the error is?

$$\begin{align} 1 &\equiv 0^{0} \\ &\equiv 0^{p-1}\\ &\equiv 0^{1+p-2} \\ &\equiv 0^1 \cdot 0^{p-2} \\ &\equiv 0 \cdot 0 \\ &\equiv 0 \pmod{p} \end{align}$$

Edit: $p$ is an odd prime.

4

There are 4 best solutions below

0
On BEST ANSWER

Misapplied modular exponent reduction below appears to be the root of the misunderstanding.

Do I really need Fermat's Little Theorem to reason that

$\ \ \ \ 0\equiv p\!−\!1\pmod{p\!-\!1}\ $ and thus $\ \color{#0a0}{0^{\large 0}\!\equiv 0^{\large p−1}}\!\pmod{p}$

True is $\,n\equiv k \pmod{p\!-\!1}\,\ $ implies $\,\ \color{#0a0}{a^{\large n}\,\equiv\, a^{\large k}}\ \pmod{\!m}\ \ \color{#c00}{{\rm assuming}\ \ a^{\large p-1}\equiv 1\pmod{\!m}}$

because $\, n\, =\, k+j\,(p\!-\!1)\,\Rightarrow\, a^{\large n} = a^{\large k}(\color{#c00}{a^{\large p-1}})^{\large j}\equiv a^{\large k} \color{#c00}1^{\large j}\equiv a^{\large k}\pmod{\!m}$

But in your case $\,a \equiv 0\,$ so $\,\color{#c00}{a^{\large p-1}}\equiv 0^{\large p-1}\equiv \color{#c00}{0\not\equiv 1}\,$ so above does not apply

Therefore you don't need little Fermat, but you do need the $\color{#c00}{\text{ hypothesis}}$ that $\,a^{\large p-1}\equiv 1\pmod{\!m}\,$ to apply the above inference to infer that exponents on $a$ can be considered $\!\bmod p\!-\!1$.

0
On

Fermat's little theorem states that $$a^p\equiv a\mod{p}$$ If $\gcd{(a,p)}=1$ then this simplifies to $$a^{p-1}\equiv1\mod{p}$$ But $\gcd{(0,p)}=p\ne1$ hence we do not have $0^{p-1}\equiv1\pmod{p}$.

2
On

The congruence fails at line 2 because $0^0$ is not congruent to $0^{p-1}$. Fermat's Little Theorem says $x^p\equiv x$ but since 0 has no Inverse you cannot then conclude $x^{p-1} \equiv 1$ unless $x\not = 0$.

0
On

Okay, consider a commutative ring $R$ with unity 1 such as the residue class ring modulo $p$.

The powers of an element $a\in R$ are inductively defined $a^0 = 1$ and $a^{n+1} = a^n\cdot a$. This includes the zero element $0\in R$ which is always absorbing, i.e., $a\cdot 0 =0$.

Thus we have $0^0 =1$ and $0^{n+1} = 0^n\cdot 0 = 0$ by absorption. Done.