# Homework Help: Number thory- fermet's little theorm

1. Feb 14, 2012

### yeland404

1. The problem statement, all variables and given/known data
let a and b be integers that not divisible by the prime number p
if a^p$\equiv$b^p, prove that a^p$\equiv$b^p mod p^2

2. Relevant equations

if a^p$\equiv$b^p, prove that a$\equiv$b mod p

3. The attempt at a solution
I already get that a$\equiv$b mod p , then how can I get a^p$\equiv$b^p mod p^2 under the a^p$\equiv$b^p mod p

2. Feb 15, 2012

### blazeatron

Hi ... i dono how to get the result a^p≡b^p mod p^2 using Fermat's theorem . But , the result can be proven using Binomial series.
Let a = mp + r , b = np + r where m and n are arbitrary integers.r is also an integer that denotes the remainder when a or b is divided by p.It is clear that our definition for a and b satisfy the intermediate result a≡b mod p = r.

ap ≡ (mp + r )p mod p2

Expanding RHS by binomial series and removing the terms which is exactly divisible by p^2 , we get ,

(mp + r )p mod p2 ≡ rp mod p2

similarly , bp ≡ (np + r )p mod p2 ≡ rp mod p2

Thus , it is proved that a^p and b^p will produce the same remainder when divided by p^2

Hope that u can understand this explanation... if not , post me the steps that you didnt understand ... i ll try to explain in detail

Last edited: Feb 15, 2012