How to solve this $ (7/2)\bmod5$?

218 Views Asked by At

I know its answer is $3\cdot5$ but I want to ask that is the following true-

$$(a/b)\bmod(p) = (a\bmod(p))\cdot((1/b)\bmod(p)))\bmod(p)$$

(where $a$ and $b$ are any integers and $p$ is a prime number.)

$(1/b)\bmod(p)$ can be solved by Euler's formula but i don't get correct answer if i solve it this way, how to solve this?

2

There are 2 best solutions below

3
On BEST ANSWER

As $\displaystyle7\equiv2\pmod5, \frac72=7\cdot2^{-1}\equiv2\cdot2^{-1}\pmod5\equiv1$


Alternatively, As $\displaystyle2\cdot3\equiv1\pmod5\implies 2^{-1}\equiv3$

$\displaystyle\implies\frac72=7\cdot2^{-1}\equiv7\cdot3\equiv1\pmod5$

4
On

I do not really understood what you have done but this is how i would do...

If for some $0\leq x\leq 4$ i have $\dfrac{7}{2}\mod5=x$ then see that $5$ divides $\frac{2x-7}{2}$ which implies $5$ divides $2x-7$

Check what $x$ would work in this case...