As I understand Euler's Generalization of Fermat's little theorem in Modulo Arithmetic, it is:
$a^{\phi(n)} \equiv 1 \pmod{n}$
However, I have also seen a version of the theorem which seems more understandable and goes:
"If b and n have a highest common factor of 1, then $b^x \equiv 1 \pmod{n}$, for some number x less than n".
Are these the same? Are both valid? And If the second is valid, then why, for example, is $5^3 \equiv 1 \pmod{8}$ not true? As I see it, 5 and 8 are relatively prime, and 3 is smaller than 8, so why doesn't this work?
And just to clarify: If the 2nd isn't true, phi in the first is simply any real number? So, for example, if $2^6 \equiv 1 \pmod{9}$ (true), then the phi is 2/3?
Linked to the 3rd, could someone please give me a general explanation of the theorem?
- Application of the theorem: How would I evaluate the following using Euler's theorem?
a) $3^{101} \mod 16$.
b) $5^6 \mod{14}$.
Thanks!
@AnuragA and @Peter have set you on the right track. Here is further thorough clarification.
Both are correct, but the first is more common because the 2nd one is slightly more misleading. It says for some number , this doesn't mean for every number < you will have the result. That is why your example is not true, as you pointed out.
() refers to the totient function - essentially, refers to the number of natural numbers smaller than n, which are relatively prime (i.e HCF is 1) to $n$. For example, (8) is 4 (1, 3, 5, 7).
Essentially, for some number b which is relatively prime to the modulo given, n, b to the totient function of n is congruent to 1 modulo n. It generalises Fermat's little theorem to non-primes.
(a) (16)= 8, so $3^8 \cong 1$ mod 16. Since $3^{101}$ = $(3^8)^{12} * 3^5$, we can say that this is equal to $1 * 3^5 $mod 16. So since $3^5$ = 243, and $243 \cong 3$ mod 16, we can now say that $3^{101} \cong 3$ mod 16.
(b) this is slightly more challenging - I encourage you to try and work it out equipped with this knowledge...