1

According to Wolfram (https://mathworld.wolfram.com/FermatQuotient.html),

$\displaystyle \frac{2^{p-1}-1}{p}=\frac{1}{2}\sum_{n=1}^{p-1}\frac{\left(-1\right)^{n-1}}{n}$

I am struggling to understand how the sum is derived because the RHS converges to $\frac{1}{2}\ln2$ as $p\rightarrow\infty$. However, Fermat quotients diverge. I would be grateful for any help on this.

UNOwen
  • 175
  • 14
  • 2
    The sums are equal modulo $p$ where $\frac 1n$ refers to multiplying by the multiplicative inverse of $n$ modulo $p$. The right hand sum is then a modulo $p$ sum, not a sum of real numbers, and there's no question of convergence of such a sum. – Sarvesh Ravichandran Iyer Feb 13 '21 at 16:21
  • Thank you for your response. How would I write the above equation in modulo notation (i.e. $\frac{2^{p-1}-1}{p}\equiv\frac{1}{2}\sum_{n=1}^{p-1}\frac{\left(-1\right)^{n-1}}{n}\pmod{p}$ doesn't seem quite right)? – UNOwen Feb 14 '21 at 00:08
  • Another way of phrasing my question is that I can't see how $\frac{2^{p-1}-1}{p}-\frac{1}{2}\sum_{n=1}^{p-1}\frac{\left(-1\right)^{n-1}}{n}$ is a multiple of $p$, give that $\forall p \in \mathbb{Z}$, $\frac{2^{p-1}-1}{p}-\frac{1}{2}\sum_{n=1}^{p-1}\frac{\left(-1\right)^{n-1}}{n}\notin\mathbb{Z}$. – UNOwen Feb 14 '21 at 02:48
  • That is my point. See, $\frac 1n$ is a quantity modulo $p$. Let me give you an example : what $\frac 13$ modulo $5$? We have that $2 \times 3 = 6 = 1$ modulo $5$, so $2 = \frac 13$ modulo $5$. We then interpret $\frac 13$ as $2$. So they are all integers modulo $p$. Read the answer here for more details. Unfortunately, the expression you've written in your first comment is right and is probably the way things should be written. We can clarify this with examples. – Sarvesh Ravichandran Iyer Feb 14 '21 at 03:17
  • So, if we can interpret $\frac{1}{3}$ as $2$ (similar to the idea of an isomorphism), what can the sum be interpreted as (i.e. could the congruence be solved in terms of some $k$)? For example, $\forall a,b,p\in\mathbb{Z}$, if $a\equiv b \pmod{p}$, then $\frac{a-b}{p}\in\mathbb{Z}$. That doesn't apply for when $p$ is not an integer. Sorry, if my questions are tedious but I don't find the concept intuitive. – UNOwen Feb 14 '21 at 05:10
  • I think you are due an answer to this question. I will do my best to provide it in some time. It is not intuitive, so I will add intuition when possible. – Sarvesh Ravichandran Iyer Feb 14 '21 at 05:11
  • You may see the answer below. – Sarvesh Ravichandran Iyer Feb 14 '21 at 07:01

1 Answers1

2

The meaning of $\frac1a \pmod m$

The idea behind the notation $\frac 1a$ modulo $m$ comes from ring theory (Please use the Wikipedia pages for groups and rings to get in touch with these concepts). Indeed, the integers $0,...,m-1$ form a group under operation $a + b = c$ where $c$ is the remainder when $a+b$ (the usual sum) is divided by $m$, and under the multiplication operator $a \cdot b = c$ where $c$ is the remainder when $a\cdot b$ (the usual product) is divided by $m$.

Now, $1$ is called the multiplicative identity , because $a \cdot 1 =a$ for any $a$. In correspondence with group theoretic reasoning, we call an element $a \in \{0,...,m-1\}$ invertible if there is a $b$ such that $a \cdot b = 1$. That is, if there is an integer $b \in \{0,1,...,m-1\}$ such that $a \cdot b$ leaves a remainder of $1$ when divided by $m$.

It can be proven that the inverse, if it exists, is unique. The notation of the inverse of $a$ , if it exists, is either $\frac 1a$ or $a^{-1}$.

Now, there is an easy result for when $a$ is invertible in $\{0,...,m-1\}$ (we call this as invertibility modulo $m$).

$a$ is invertible if and only if $\gcd(a,m) = 1$.

So $\frac 1a$ is a valid element of $\{0,1,...,m-1\}$ whenever $a$ is coprime to $m$.

$\textbf{A SMALL CAVEAT}$ : The quantity $\frac{2^{p-1}-1}{p}$ is an actual division by $p$. You can see that $\gcd(p,p) = p \neq 1$ so $\frac 1p$ doesn't make sense modulo $p$. That is an actual division by $p$. I will show this in my example below. It is an abuse of notation of $\frac{\cdot}{\cdot}$ to represent both actual division and modulo division, and we should be careful of this in general. You can ask if $\frac{2^{p-1}-1}{p}$ will always be an integer : this is true by Fermat's little theorem.

Examples

  • Let $m=5$ and $a=2$. Then $\gcd(2,5) = 1$ so $\frac 12$ is a well defined element modulo $5$. Can we find it? By experimenting, $2 \cdot 3 = 6$ leaves remainder $1$ upon division by $5$, so $3 = \frac 12$ modulo $5$. In particular, when we are dealing with the ring of integers modulo $5$, and we see $\frac 12$ somewhere, it actually stands for $3$.

  • Let $m =15$ and $a = 8$. Then $\gcd(8,15) = 1$ and you can see that $\frac 18 = 2$.

  • Let $m = 16$ and $a=10$. Then $\gcd(10,16) \neq 1$ so $\frac 1{10}$ cannot be defined or talked about modulo $16$.

  • Let $m$ be a prime, and $a \neq 0$. Then $\gcd(a,m) = 1$ so $\frac 1a$ always exists, although one can find it only by experimentation or algorithms like reversing the Euclidean algorithm.

On the identity in the question

Thus, what does the identity mean finally? Well, the RHS is not a real number, but rather an integer modulo $p$. The only way to illustrate this is to actually compute both the sides for a certain prime $p$. We will compute each term separately. Let's go with $p=5$.

  • LHS : $\frac{2^{p-1}-1}{p} = \frac{2^4-1}{5} = 3$, an actual division, remember the caveat.

  • RHS : We have $\frac 12 = 3$. Then for each of $n=1$ to $4$ we compute $\frac{(-1)^{n-1}}{n}$. For $n=1$, $\frac {(-1)^0}{1} = \frac 11 = 1$. Then for $n=2$ we have $\frac{(-1)^1}{2} = -\frac{1}{2}= -3 = 2$. For $n=3$ we have $\frac{(-1)^2}{3} = \frac 13 = 2$. For $n=4$ we have $\frac{(-1)^3}{4} = \frac {-1}4 = -4 = 1$ (since $4\times 4 = 16 = 1$). So the sum finally is $3(1+2+2+1) = 3 \cdot 6 = 18 =3$.

So both RHS and LHS are equal to $3$ modulo $5$. That is how you would read that identity.

Historical significance

So what's the fuss about this whole identity? Well, it comes from Fermat's last theorem. Recall the Fermat's last theorem : for every $n \geq 3$ there are no positive integers $x,y,z$ with $x^n+y^n=z^n$.

It is easy to prove that Fermat's last theorem is true if and only if it is true for $n$ taking just prime values, $n>2$. So we can study each prime. While studying each prime, the Fermat quotient comes up, in a way that I can't explain but is illustrative.

Wieferich proved in 1909 that if the FLT was contradicted for $n=p$, then it is necessary that $\frac{2^{p-1}-1}p = 0 \pmod{p}$. That is, we must have that the Fermat quotient for $p$ with base $2$ must be equal to $0$. This generated interest in the identity given because it naturally provided a different way of computing the Fermat quotient.

Only two primes (such primes with Fermat quotient with base $2$ equal to $0$ are called Wieferich primes) are known! They are $1093$ and $3511$.

The result does not stay true for only base $2$ : it was later extended to all prime bases up to $89$. That is : if there is a counterexample of FLT for $n=p$ then the Fermat quotient of $p$ with base $k$ must be zero for all primes $k$ from $2$ to $89$! If only we could show that no such prime existed, we'd be done, but this has been elusive.

Proof of the identity

The proof of the identity is not easy, because it involves some manipulations that you will not be able to get at first glance. So I will not include it here. Instead, I will ask you to visit the post here, which goes through the proof of a very similar identity. You can attempt to use the proof there to prove this.

The main idea is to get yourself comfortable with arithmetic modulo $p$. This is necessary before you can understand the above identity.

  • Thank you for all your help. To be clear, $\frac{1}{2}$ maps to $3$, $\frac{1}{3}\rightarrow 2$, $\frac{1}{4}\rightarrow 4$ modulo $5$. How would one define a general operation for some $\frac{1}{a}\rightarrow k$? It seems that $1\equiv ak \pmod{5}$ is one option, but this implies that $\frac{1}{2}$ maps to $3,8,13,3+5n$ etc. I assume that it is the first multiple (i.e. when $n$ is $0$), but how would this be mathematically defined? – UNOwen Feb 14 '21 at 10:17
  • @UNOwen Yes, it is defined as the unique member of ${0,...,m-1}$ which works. So for example, even though $\frac 12$ modulo $5$ could be any of $3,-2,-7,8,13$ and so on (multiplying each of these with $2$ leads to a number which has remainder $1$ when divided by $5$), only $3$ lies between $0$ and $5$, so we take $\frac 12 = 3$. – Sarvesh Ravichandran Iyer Feb 14 '21 at 10:37