3

Burton's "Elementary Number Theory", Chapter 5 says

It might be worthwhile to give an example illustrating the failure of the converse of Fermat's Little Theorem to hold, in other words, to show that if $a^{n-1}\equiv 1 \pmod n$ for some integer $a$, then $n$ need not be prime.

and proceeds to show that $2^{340}\equiv 1\pmod {341}$ after which it comments

so that the converse to Fermat's Little Theorem is false.

Now, here's my confusion: if we let $$\text{A: }p \text{ is a prime}\\ \text{B: }a^p\equiv a\pmod p \;\;\forall a\in \mathbb N$$ then (generalized) Fermat's Little Theorem translates to $$\text{A}\implies \text{B}$$ The converse of this should be $$\text{B}\implies \text{A}$$ and its negation should be $$\neg (\text{B}\implies \text{A})$$ or $$\text{B}\wedge \neg\text{A}$$ which translates to

$a^p\equiv a\pmod p \;\;\forall a\in \mathbb N$, but $p$ is not a prime.

So, to illustrate that the converse is false, we really need to find a composite $n$ such that $a^n\equiv a\pmod n$ for all $a$ and not just one $a$ (as done in the book).

I understand that Burton soon introduces absolute pseudoprimes (or Carmichael numbers) which can be valid counterexamples to Fermat's Little Theorem, but I don't understand how the given "counterexample" does the job. It would be of help if someone has an explanation.

Sayan Dutta
  • 8,831
  • 3
    I agree with your reasoning as well. – Arkady Aug 27 '22 at 14:08
  • 3
    See here for the "converse". I think the statement has a typo here. The quantifiers for $a$ (copime to the exponent is also missing) are missing. Perhaps a translation problem. "For some integer $a$" must be nonsense, because we could just take $a=1$. Or the author wanted to contradict first a weaker statement. – Dietrich Burde Aug 27 '22 at 14:32
  • 1
    The given counterexample just shows that a single Fermat-test with a base $a$ satisfying $1<a<n$ and $\gcd(a,n)=1$ is not enough to ensure that $n$ is prime. As you mentioned, it is even not enough that $a^{n-1}\equiv 1\mod n$ holds for every $a$ coprime to $n$ (Carmichael numbers) , but the author wanted to start with the refutation of a simpler statement. – Peter Aug 27 '22 at 14:45

0 Answers0