一道数论小练习

Let p, N be integers such that p divides N. Prove that for any integer X, [[X mod N] mod p ] = [X mod p ]. Show that, in contrast, [[X mod p ] mod N] need not equal [X mod N].

1.

∵p divides N

∴ let N = kp

∵ if X <= N:

[[X mod N] mod p] = [X mod p]

else if X > N:

let X = dN + c =dkp + c (c

[[X mod N] mod p] = [[(dN + c) mod N] mod p] = [[c mod N] mod p] = [c mod p]

[X mod p] = [(dkp + c) mod p] = [c mod p]

thus:

[[X mod N] mod p] = [X mod p]

 

2.

when p = N -> [[X mod p ] mod N] equals to [X mod N].

when p <> N:

∵p divides N

∴p < N

thus : [[X mod p ] mod N] <= p for certain

while [X mod N] is not needed to be lower than p.

so [[X mod p ] mod N] need not equal [X mod N]

你可能感兴趣的:(一道数论小练习)