2
$\begingroup$

Equation: $[3*(k \mod 4)] \mod 4 = 3$

It's relatively easy to check the equation for the possible values of $k \mod 4$. Is there a more elegant way to calculate the solution, for example by using modulo properties?

$\endgroup$
  • $\begingroup$ Welcome to Mathematics Stack Exchange. If $3k\equiv3 \pmod 4$ then $3\times3k\equiv3\times3\pmod 4$ so $9k\equiv 9\pmod 4$ so $k\equiv 1\pmod 4$ [I chose to multiply by $3$ because $3^{-1}\equiv3\pmod 4$] $\endgroup$ – J. W. Tanner Oct 16 at 13:58
1
$\begingroup$

To solve $3k\equiv3\pmod4$, multiply both sides by the inverse of $3\pmod 4$ (which is $3$):

$3k\equiv3\pmod4\implies 3^{-1}3k\equiv3^{-1}3\pmod4\implies k\equiv1\pmod 4$

$\endgroup$
  • $\begingroup$ And what about a situation in which $[3*(k \mod 4)] \mod 4 = 1$? Or any other number which wouldn't have 3 as a factor? $\endgroup$ – DaddyMike Oct 16 at 18:50
  • $\begingroup$ The solution to $3k\equiv 1\pmod4$ is $k\equiv 3^{-1}1\equiv 3\pmod 4$; $3k\equiv0\pmod4$ is $k\equiv3^{-1}0\equiv0\pmod4$; $3k\equiv2\pmod4$ is $k\equiv3^{-1}2\equiv 3\times2\equiv6\equiv2 \pmod4$ $\endgroup$ – J. W. Tanner Oct 16 at 19:18
  • $\begingroup$ You could also note that $3k\equiv a\pmod 4$ means $-k\equiv a \pmod 4$ so $k\equiv -a \pmod 4$ $\endgroup$ – J. W. Tanner Oct 16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.