-1

I'm trying to understand the modulo operation.

Let $$k,n \in \mathbb{Z}$$ At firt I thought:

$$\left(4k-4n\right)\bmod 4N=\left(k-n\right)\bmod N$$

But after a few simple examples I realized that this is not true. On the other hand, for each example I find that the following statement is true:

$$\frac{\left(4k-4n\right)\bmod 4N}{4}=\left(k-n\right)\bmod N$$

Is this statement really true? If so, why?

Gary
  • 31,845

1 Answers1

-1

Let $\frac{(4k−4n)\bmod 4N}{4}=a$. Then $(4k-4n)\bmod4N=4a$ and so $4a=4k-4n+4Nm$ for some integer $m$. So dividing both sides by $4$ we get $$a=\frac{4k-4n+4Nm}{4}=k-n+Nm$$ Taking both sides $\bmod N$ we get $a=(k-n)\bmod N$ and therefore $$\frac{(4k−4n)\bmod 4N}{4}=a=(k-n)\bmod N$$

Gary
  • 31,845
SFA
  • 117