I'm a very slow learner in math. Would someone be kind enough to explain in detail how to solve the above question?
Thanks in advance.
I'm a very slow learner in math. Would someone be kind enough to explain in detail how to solve the above question?
Thanks in advance.
You have addition and multiplication modulo $n$. To calculate $2n-1\mod n$, you may calculate $2n\mod n$ and $-1\mod n$ separately and then add the results (and take the result $\mod n$ again, if necessary).
Thus, $2n-1\mod n = ((2n\mod n)+(-1\mod n))\mod n= (0-1)\mod n \equiv -1$.
Does this answer your question?