0

I am trying to prove the following theorem: If $n$ is a Fermat Pseudoprime to the base $a$ then $n$ and $a$ are relatively prime.

As a recap a Fermat Pseudoprime $n$ has the property that for $n$ not being prime if for all $a$ such that $2\leq a \leq n-1$ $$a^{n-1}\equiv 1\,\, (mod\, n)$$

I tried it in a following way but am not sure if it is correct. I tried by using the proof by contrapositive method:

If $n$ and $a$ are not relatively prime then either $n>a$ or $n\leq a$.

In the first case I can then write $n=\alpha a$. Now we need to show that $$a^{n-1}\neq 1 (mod \, n)$$ Clearly $$n\nmid a^{n-1}-1$$ because that is the same as saying: $$\alpha a\nmid a^{n-1}-1$$ here the second term is not a whole number so therefore $n$ cannot be a pseudoprime.

For the second case: $a=\alpha n$

In that case we have to show again that $$a^{n-1}\neq 1 (mod \, n)$$ or written differently: $$(\alpha n)^{n-1}\neq 1 (mod \, n)$$ Thus again $$n\nmid (\alpha n)^{n-1}-1$$ because the second term is not a whole number.

Is this proof correct?

Bill Dubuque
  • 282,220
eeqesri
  • 793
  • 2
    If $n,|,(a^{n-1}-1)$ then of course $\gcd(a,n)=1$ (any common divisor would also divide $1$). As a formatting note: \nmid looks a lot better than \not |. It's $\nmid$ vs $\not |$. – lulu Apr 16 '24 at 20:07
  • @lulu okay yes that's a lot simpler than what I did. I didn't see that somehow. – eeqesri Apr 16 '24 at 20:13

1 Answers1

1

There's a much simpler way to prove the theorem as mentioned by lulu in the comments. Since we have $$a^{n-1}\equiv 1 (mod\, n)$$ We have $$n|a^{n-1}-1$$ Then we can write: $$a^{n-1}-1=\alpha n$$ Rearranging:

$$(a^{n-2})a+(-\alpha) n=1$$

this means that $gcd(n,a)=1$ and since we know that n is not a prime number $n$ and $a$ must be relatively prime.

eeqesri
  • 793