# How to solve this modulo equation using modulo properties?

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?

• 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$] – J. W. Tanner Oct 16 at 13:58

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$$
• 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? – DaddyMike Oct 16 at 18:50
• 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$ – J. W. Tanner Oct 16 at 19:18
• You could also note that $3k\equiv a\pmod 4$ means $-k\equiv a \pmod 4$ so $k\equiv -a \pmod 4$ – J. W. Tanner Oct 16 at 19:30