Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fermat's little theorem
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|A prime p divides a^pβa for any integer a}} {{For|other theorems named after Pierre de Fermat|Fermat's theorem}} In [[number theory]], '''Fermat's little theorem''' states that if {{mvar|p}} is a [[prime number]], then for any [[integer]] {{mvar|a}}, the number {{math|''a''<sup>''p''</sup> β ''a''}} is an integer multiple of {{Mvar|p}}. In the notation of [[modular arithmetic]], this is expressed as <math display="block">a^p \equiv a \pmod p.</math> For example, if {{math|''a'' {{=}} 2}} and {{math|''p'' {{=}} 7}}, then {{math|2<sup>7</sup> {{=}} 128}}, and {{math|128 β 2 {{=}} 126 {{=}} 7 Γ 18}} is an integer multiple of {{math|7}}. If {{mvar|a}} is not divisible by {{mvar|p}}, that is, if {{mvar|a}} is [[coprime]] to {{mvar|p}}, then Fermat's little theorem is equivalent to the statement that {{math|''a''<sup>''p'' β 1</sup> β 1}} is an integer multiple of {{mvar|p}}, or in symbols:<ref>{{harvnb|Long|1972|pages=87β88}}.</ref><ref>{{harvnb|Pettofrezzo|Byrkit|1970|pages=110β111}}.</ref> <math display="block">a^{p-1} \equiv 1 \pmod p.</math> For example, if {{math|''a'' {{=}} 2}} and {{math|''p'' {{=}} 7}}, then {{math|2<sup>6</sup> {{=}} 64}}, and {{math|64 β 1 {{=}} 63 {{=}} 7 Γ 9}} is a multiple of {{math|7}}. Fermat's little theorem is the basis for the [[Fermat primality test]] and is one of the fundamental results of [[elementary number theory]]. The theorem is named after [[Pierre de Fermat]], who stated it in 1640. It is called the "little theorem" to distinguish it from [[Fermat's Last Theorem]].<ref name=Burton>{{harvnb|Burton|2011|page=514}}.</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)