Originally Posted by

**carabidus** Hello, everyone! Just wanted some ideas regarding the following problems.

1) Let a and b be integers and p be a prime number. Prove the following:

a) a^2 = b^2 mod p implies that a = ħb mod p.

$\displaystyle \color{red}a^2 \equiv b^2\,(mod\,p)\Longleftrightarrow (a-b)(a+b)=a^2-b^2\equiv 0\,(mod\,p)\Longleftrightarrow p\mid(a-b)(a+b)$

$\displaystyle \color{red}\mbox{Since p is a prime then....}$

b) a^2 = a mod p implies that a = 0 mod p or a = 1 mod p.

$\displaystyle \color{red}a^2=a\Longleftrightarrow a(a-1)=0$

2) Let p be prime and (a,p) = (b,p) = 1. Prove the following:

a) a^p = b^p mod p implies that a = b mod p.

$\displaystyle \color{red}\mbox{Read about Fermat's Little Theorem (FLT):}a^p\equiv a (mod\,p)$

b) a^p = b^p mod p implies that a^p = b^p mod p^2.

$\displaystyle \color{red}\mbox{Apply FLT to get}\,\,a \equiv b\,(mod\,p)\Longrightarrow a-b=kp\,,\,\,with\,\,k\in \mathbb{Z}\,...etc.$

$\displaystyle \color{red}Tonio$

Thanks!