Daily Note #1 - Fermat's Little Theorem

So, starting with my first daily note, the topic is Fermat's Little Theorem.

Topic: Number Theory

Fermat's Little Theorem states that

"For all natural numbers 'a' , apamodpa^{p} \equiv a \mod p , where 'p' is a prime number. "

Let us prove this out.

Consider the binomial expansion for the prime 'p',

(a+b)p=ap+(p1)ap1b+(p2)ap2b2+.......+bp (a+b)^{p} = a^{p} + \binom{p}{1} a^{p-1} b +\binom{p}{2} a^{p-2} b^{2} + ....... + b^{p}.

But since, p(pk)k=1,2,3,.....p1 p| \binom{p}{k} \forall k=1,2,3,.....p-1. So, (p1)ap1b+(p2)ap2b2+.......+(pp1)abp1=Multiple(p) \binom{p}{1} a^{p-1} b +\binom{p}{2} a^{p-2} b^{2} + ....... + \binom{p}{p-1} a b^{p-1} = Multiple(p) . This implies that, (a+b)pap+bpmodp (a+b)^{p} \equiv a^{p} + b^{p} \mod p .

Generalizing this we get, (a1+a2+.....an)pa1p+a2p+........+anpmodp (a_{1}+a_{2} +.....a_{n})^{p} \equiv a_{1}^{p} + a_{2}^{p} +........ +a_{n}^{p} \mod p . By taking a1=a2=.....=an=1a_{1}=a_{2}=.....=a_{n}=1, we get npnmodpn^{p} \equiv n \mod p. That's it, we got the result.

Phewwwwwww!! We have proved it.

Fermat's Theorem is very useful in some problems based on Modular Arithmetic.

Now, if (a,p)=1(a,p) =1,i.e. if aa and pp are coprime to each other, then ap11modpa^{p-1} \equiv 1 \mod p. This is known as Fermat's Little Theorem and it is a special case of Euler's Totient Theorem.

Now let us solve some problems.

Problem 1(introductory): Find the remainder when 37112337^{1123} is divided by 1717.

Solution: Observe that 373mod1737 \equiv 3 \mod 17 and from Fermat's Theorem 371737mod1737^{17} \equiv 37 \mod 17. But 1123=66×17+11123 = 66 \times 17 + 1. So, 371123(3717)66×373766×373767(3717)3×371637^{1123} \equiv (37^{17})^{66} \times 37 \equiv 37^{66} \times 37 \equiv 37^{67} \equiv (37^{17})^{3} \times 37^{16} 373×37163717×37237×372373332710mod17 \equiv 37^{3} \times 37^{16} \equiv 37^{17} \times 37^{2} \equiv 37 \times 37^{2} \equiv 37^{3} \equiv 3^{3} \equiv 27 \equiv 10 \mod 17.

So, 37112310mod1737^{1123} \equiv 10 \mod 17. This is can be even very easily using Fermat's littile theorem(Try Yourselves).

Problem 2: Find the remainder when 220+330+440+550+6602^{20} + 3^{30} + 4^{40} + 5^{50} + 6^{60} is divided by 77.

Solution: Observe that (2,7)=(3,7)=(4,7)=(5,7)=(6,7)=1.(2,7)=(3,7)=(4,7)=(5,7)=(6,7)=1. So, 22022mod7 2^{20} \equiv 2^{2} \mod 7, 3301mod73^{30} \equiv 1 \mod 7, 440444mod74^{40} \equiv 4^{4} \equiv 4 \mod 7, 550524mod75^{50} \equiv 5^{2} \equiv 4 \mod 7 and 6601mod76^{60} \equiv 1 \mod 7. So, 220+330+440+550+6604+1+4+4+10mod72^{20} + 3^{30} + 4^{40} + 5^{50} + 6^{60} \equiv 4+1+4+4+1 \equiv 0 \mod 7.

So, 220+330+440+550+6600mod72^{20} + 3^{30} + 4^{40} + 5^{50} + 6^{60} \equiv 0 \mod 7.

So, I think that I have given a clear picture on Fermat's Theorem. So, stay tuned for upcoming DAILY NOTES.

Note by Surya Prakash
4 years, 1 month ago

No vote yet
1 vote

</code>...<code></code> ... <code>.">   Easy Math Editor

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in </span>...<span></span> ... <span> or </span>...<span></span> ... <span> to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

Another way to prove Fermat's Theorem by using reduced residue system !!

Given that : { r1,r2,...,rp1 { r_{1},r_{2},...,r_{p-1} } } is the reduced residue system of p

Because of (a,p)=1(a,p) = 1 so (a.ri,p)=1;(i=1,2,...,p1)(a.r_{i},p) = 1; (i = 1,2,...,p-1 )

So that : a.r1.a.r2...a.rp1r1.r2...rp1(modp) a.r_{1}.a.r_{2}...a.r_{p-1} \equiv r_{1}.r_{2}...r_{p-1} \pmod{p}

ap1.r1.r2...rp1r1.r2...rp1(modp)\Rightarrow a^{p-1}.r_{1}.r_{2}...r_{p-1} \equiv r_{1}.r_{2}...r_{p-1} \pmod{p}

Thus,

ap11(modp)a^{p-1} \equiv 1 \pmod{p}

The theorem is proved !!

Rony Phong - 4 years, 1 month ago

Log in to reply

Nice work, bro. Upvoted ¨ \ddot \smile.

Trung Đặng Đoàn Đức - 4 years, 1 month ago

Log in to reply

Tks, i have checked your profile, it very impress, proud to be a vietnamese :D

Rony Phong - 4 years, 1 month ago

Log in to reply

@Rony Phong Yep, proud to be Vietnamese :)

Trung Đặng Đoàn Đức - 4 years, 1 month ago

Log in to reply

That is how I've been doing it yet.

Samanvay Vajpayee - 1 year, 6 months ago

Log in to reply

Is there anything that you can add to the Fermat's Little Theorem Wiki page?

Calvin Lin Staff - 4 years, 1 month ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...