215k views
2 votes
Suppose that 2^(n−1) ≡ 1 (mod n). Is n necessarily prime?

1 Answer

4 votes

Final answer:

The condition 2^(n−1) ≡ 1 (mod n) is not a sufficient test for primality because there are composite numbers called Carmichael numbers that also satisfy this condition.

Step-by-step explanation:

The question asks whether n is necessarily prime if 2^(n−1) ≡ 1 (mod n). This congruence resembles a property known as Fermat's little theorem, which states that if n is prime, then 2^(n−1) ≡ 1 (mod n). However, the condition in this question is not a sufficient test for primality. While it is true for all prime numbers, there are composite numbers, known as Carmichael numbers, that also satisfy this property. Thus, it is possible for n to be composite even if it satisfies the given congruence.

User Johnnerz
by
7.4k points