- #1
- 15,092
- 9,621
I'm looking for theorems related to using modulo arithmetic.
As an example, if I apply a sequence of arithmetic operations to a given number to get an answer and then apply a modulo operation on the result to get a remainder in a given base. Wiil that be the same if I apply the modulo operation intermittently between the arithmetic operations?
For arithmetic operations, I'm referring to +,-,*, / only
Consider the case of ##5!## to be ##5*4*3*2*1+1 =121## and 121 mod 6 vwould yield 1
vs
5*4 = 20 --> 20 mod 6= 2
2*3 = 6 ==> 6 mod 6 = 0
0*2 = 0 ==> 0 mod 6 = 0
0*1 = 0 ==> 0 mod 6 = 0
0+1 = 1 ==> 1 mod 6 = 1
Intuitively, it seems the same but I'm looking for a definitive proof for arbitrary modulo base.
A counterexample would be good too.
As an example, if I apply a sequence of arithmetic operations to a given number to get an answer and then apply a modulo operation on the result to get a remainder in a given base. Wiil that be the same if I apply the modulo operation intermittently between the arithmetic operations?
For arithmetic operations, I'm referring to +,-,*, / only
Consider the case of ##5!## to be ##5*4*3*2*1+1 =121## and 121 mod 6 vwould yield 1
vs
5*4 = 20 --> 20 mod 6= 2
2*3 = 6 ==> 6 mod 6 = 0
0*2 = 0 ==> 0 mod 6 = 0
0*1 = 0 ==> 0 mod 6 = 0
0+1 = 1 ==> 1 mod 6 = 1
Intuitively, it seems the same but I'm looking for a definitive proof for arbitrary modulo base.
A counterexample would be good too.