AoPSWiki
Want to learn how to tackle those tough MATHCOUNTS and AMC counting and probability problems? Check out Art of Problem Solving's Introduction to Counting & Probability by David Patrick.

Fermat's Little Theorem

From AoPSWiki

Fermat's Little Theorem is highly useful in number theory for simplifying computations in modular arithmetic (which students should study more at the introductory level if they have a hard time following the rest of this article).


Contents

Statement

If is an integer, is a prime number and is not divisible by , then .

Note: This theorem is a special case of Euler's Totient Theorem.

Corollary

A frequently used corollary of Fermat's Little Theorem is . As you can see, it is derived by multipling both sides of the theorem by a. The restated form is nice because we no longer need to restrict ourselves to integers not divisible by .

Sample Problem

One of Euler's conjectures was disproved in the 1960s by three American mathematicians when they showed there was a positive integer such that . Find the value of . (AIME 1989/9)

By Fermat's Little Theorem, we know is congruent to modulo 5. Hence,



Continuing, we examine the equation modulo 3,

-1 + 1 + 0 + 0 \equiv n\pmod{3}




Thus, is divisible by three and leaves a remainder of four when divided by 5. It's obvious that , so the only possibilities are or . It quickly becomes apparent that 174 is much too large, so must be 144.

Credit

This theorem is credited to Pierre de Fermat.

See also

NEW! Hard Problems DVD
A documentary about the 2006 US IMO team. Features many current and past AoPS members!
Click here for more details and to order
© Copyright 2007 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us