Let $n=pq$ product of two different primes. Let $d=\gcd(p-1,q-1)$. Prove that $n$ is a Fermat pseudoprime to the base $a$ if and only if $a^d=1 \mod n$

I believe that I get: if $a^d=1 \mod n$ then $n$ is a pseudoprime to the base $a$.

But I can not get the other implication.


Because $pq$ is a pseudoprime, we have $a^{pq-1} \equiv 1 \mod pq$.

By Fermat's little theorem, $a^{q-1} \equiv 1 \mod q$.

Combining this with $a^{pq-1} \equiv 1 \mod q$, we get $a^{p-1} \equiv 1 \mod q$.

Therefore, $a^{\gcd(p-1,q-1)} \equiv 1 \mod q$.

In the same way $a^{\gcd(p-1,q-1)} \equiv 1 \mod p$.

Hence we get $a^d = a^{\gcd(p-1,q-1)} \equiv 1 \mod pq$

  • $\begingroup$ How do you know that $a^{pq-1}=1 mod(q)$? $\endgroup$ Apr 21 '17 at 15:20
  • $\begingroup$ $a^{pq-1} \equiv 1 \mod pq$, because it is a pseudoprime. Hence also $a^{pq-1} \equiv 1 \mod q$. $\endgroup$
    – wythagoras
    Apr 21 '17 at 15:21
  • $\begingroup$ Later... $a^{gcd(p-1,q-1)}=1 mod q$, why? That power is less than $p-1$ and $q-1$ $\endgroup$ Apr 21 '17 at 15:33
  • $\begingroup$ If $a^b \equiv 1 \mod k$ and $a^c \equiv 1 \mod k$, then $a^{\gcd(b,c)} \equiv 1 \mod k$. $\endgroup$
    – wythagoras
    Apr 21 '17 at 15:35
  • $\begingroup$ Uhmmm thank you very much! $\endgroup$ Apr 21 '17 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.