0
$\begingroup$

Let $p, N$ be positive integers with $p$ divides $N$.

Why for every integer $X$, $[[X \bmod N] \bmod p ] = [X \bmod p ]$?
And how do I show that $[[X \bmod p ] \bmod N]$ need not equal $[X \bmod N]$?

  • 0
    For the first question, that is by definition. Think about what $a + bN$ is modulo $N$ and $p$. For the second, just find a counterexample. With small enough $p$ and $N$ you can simply look at all the possibilities and find one, e.g., try finding a counterexample with $p=2$ and $N=4$.2017-01-20
  • 1
    @Alex I suggest you turn your comment into an answer. I'm getting a mixed message from you saying "by definition" and also saying "think about it" so you might want to revise that in the process.2017-01-20

1 Answers 1

-1

For the first question, that is by definition. What is $a + bN$ modulo $N$, and modulo $p$?

For the second, just find a counterexample. (If it's not true for a particular choice of $p$ and $N$, it's not true.) With small enough $p$ and $N$ you can simply look at all the possibilities and find one, e.g., try finding a counterexample with $p=2$ and $N=4$.