# Thread: [SOLVED] Prove that a^p is congruent to b^p (mod p^2) if the same is true mod p

1. ## [SOLVED] Prove that a^p is congruent to b^p (mod p^2) if the same is true mod p

For any prime $\displaystyle p$, if $\displaystyle a^p\equiv b^p\;(\text{mod } p)$, prove that $\displaystyle a^p\equiv b^p\;(\text{mod } p^2)$.
I have found this quite challenging!

I thought maybe we could divide it into two cases, where $\displaystyle p\big|a,b$ and $\displaystyle p\not\big|a,b$.

If we consider Euler's function $\displaystyle \phi(n)$, then we have, for $\displaystyle p\not\big|a,b$,

$\displaystyle b^{\phi(p^2)}\equiv a^{\phi(p^2)}\equiv 1\;(\text{mod }p^2)$.

Since $\displaystyle \phi(p^2)=p^2-p$, then

$\displaystyle b^{p^2-p}\equiv a^{p^2-p}\equiv 1\;(\text{mod }p^2)$.

So we could say that

$\displaystyle a^{p^2}\equiv a^p\;(\text{mod }p^2)$ and $\displaystyle b^{p^2}\equiv b^p\;(\text{mod }p^2)$.

And we can say a bunch of other things, too, none of which seem to get me closer to a solution.

Any help would be much appreciated!

2. Originally Posted by hatsoff
I have found this quite challenging!

I thought maybe we could divide it into two cases, where $\displaystyle p\big|a,b$ and $\displaystyle p\not\big|a,b$.

If we consider Euler's function $\displaystyle \phi(n)$, then we have, for $\displaystyle p\not\big|a,b$,

$\displaystyle b^{\phi(p^2)}\equiv a^{\phi(p^2)}\equiv 1\;(\text{mod }p^2)$.

Since $\displaystyle \phi(p^2)=p^2-p$, then

$\displaystyle b^{p^2-p}\equiv a^{p^2-p}\equiv 1\;(\text{mod }p^2)$.

So we could say that

$\displaystyle a^{p^2}\equiv a^p\;(\text{mod }p^2)$ and $\displaystyle b^{p^2}\equiv b^p\;(\text{mod }p^2)$.

And we can say a bunch of other things, too, none of which seem to get me closer to a solution.

Any help would be much appreciated!

At first sight this looks quite trivial, but let's see:

a^p = b^p (mod p) ==> a = b (mod p), since a^p = a (mod p) for any

integer a ==> a = b + kp ==> a^p = (b + kp)^p = b^p + (sum of

numbers all of which are divisible by p^2) ==> a^p = b^p (mod p^2)

The only non quite trivial thing here, imo, is why in that sum all the

numbers are divisible by p? Well, the first summand there is p(kp) and the

following ones are (binomial coefficient)*(kp)^i, with i >= 2, so...

Tonio

Pd. Indeed not "quite trivial"

3. If $\displaystyle a^p\equiv b^p$ then $\displaystyle a \equiv b$ (because $\displaystyle n \equiv n^p \mod p$).

Hence $\displaystyle b = kp + a$ for some integer $\displaystyle k$. Then

$\displaystyle b^p -a^p= (kp+a)^p -a^p= (kp)^p +{p \choose 1}(kp)^{p-1}a + ... + {p \choose 1}kpa^{p-1}$.

Note that every term in this sum is divisible by $\displaystyle p^2$ because $\displaystyle {p \choose j} \equiv 0 \mod p$ for $\displaystyle 0<j<p$. Hence $\displaystyle p^2 \mid (b^p-a^p) \Rightarrow a^p \equiv b^p \mod p^2$. $\displaystyle \square$

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# if a^p=b^p(mod

Click on a term to search for related topics.