Fermat's Little Theorem

Fermat's Little Theorem.  If p is prime and  a is not a multiple of p then    a p - 1 1 ( mod p )

Questions.
Based on this theorem what can you say if you are given the following information?

1.        1997  is a prime             Therefore,   25 1996 _ ? _ ( mod 1997 )

2.         13 6556 1780 (mod 6557)       Therefore,  __________?_____

3.        5 29340 1 ( mod 29341 )         Therefore,  _______?_______

Calculations, some relating to the questions above.

This follows from the fact that 1997 is  a prime and a direct application of Fermat's Little Theorem

PowerMod [ 25 , 1996 , 1997 ] 1

We could predict that 6557 is not prime by the contrapositive of Fermat's Little Theorem

FactorInteger [ 6557 ] ( 79 1 83 1 )

The converse of Fermat's Little Theorem is false.  If a p - 1 1 ( mod p )    then we can't conclude that p is prime.  Numbers that illustrate this fact are called psuedoprimes.

PowerMod [ 2 , 340 , 341 ] 1

341 = 11 × 31 is a psuedoprime to the base 2, but not to the base 7.

PowerMod [ 7 , 340 , 341 ] 56

29341 = 13 × 37 × 61 is a pseudoprime to a surprising number of bases.  

Map [ PowerMod [ # , 29340 , 29341 ] & , { 2 , 3 , 5 , 7 , 11 } ] { 1 , 1 , 1 , 1 , 1 }

In fact, 29341 is a pseudoprime to every prime base other than its prime divisors.  Such a number is called a Carmichael number


Converted by Mathematica      April 24, 2000