From fermat's little theorem we have for(adsbygoogle = window.adsbygoogle || []).push({}); aprime to a primep: [tex]a^{p-1}\equiv 1[/tex](mod p). Assuming p-1 to be even we must have either [tex]a^{\frac{p-1}{2}}\equiv 1[/tex] (mod p) or [tex]a^{\frac{p+1}{2}}\equiv -1[/tex] (mod p). Are there any special cases in which it is easy to determine which of the previous two conditions holds without a lot of compution?

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fermat's little theorem

**Physics Forums | Science Articles, Homework Help, Discussion**