I want to prove whether both $2p-m$ and $p+m$ are the multiples of $3$, where $p,m \in \mathbb{Z}$.
My solution:
Assume $2p-m = 3k$ and $2q-n = 3l$, where $k,l \in \mathbb{Z}$. So I could get $m = 2l-k$ and $p = k+l$. But I do not know how to prove whether above conditions must be satisfied at the same time. Could anyone help me out?
More specifically, if $p$ and $m$ are integers, $p \in [-N,N]$ and $m \in [-M,M]$. Is the answer the same? Thanks in advance!
What is your question exactly?
1) $2p - m$ and $p +m$ are either both divisible by $3$ or neither are.
Divide $2p - m$ by three and you get a quotient, call it $q_1$ and you get a remainder, call it $r_1$, so that $2p -m = 3q_1 + r_1$
Divide $p+m$ by three and you get a quotient, call it $q_2$ and you get a remainder, call it $r_2$, so that $p+m = 3q_2 + r_2$
So $(2p - m) + (p+m) = 3p$ is divisible by three. But $(2p-m) + (p+m) = (3q_1 + r_1) + (3q_2 + r_2) = 3(q_1 + q_2) + (r_1 + r_2)$. So either $r_1 + r_2=0$ or $r_1 + r_2 = 3$.
If $r_1= 0$ then $r_2=0$ and both are divisible by $3$.
If $r_1= 1$ or $r_1 = 2$ then $r_2 =2$ or $r_1 = 1$ and neither are divisible by $3$.
Was that your question?
2) If $2p - m$ and $p +m$ are both divisible by $3$ then the remainder of $p$ when divided by $3$ is the "opposite" of the remainder when $m$ is divided by $3$, in other words, if the remainder of $p$ is $k$ then the remainder of $m$ is $j= 3-k$ if $k \ne 0$ or it is $j = k = 0$ if $k = 0$.
If $m = 3q_3 + r_3$ and $m= 3q_4 + r_4$ then $2p -m = 2(3q_4 + r_4) - (3q_3 + r_3)= 3(2q_4 - q_3) + (2r_4 -r_3)$ so $2r_4 - r_3 = 0$ or $2r_4 - r_3 = 3$
And $p + m = 3q_4 + r_4 + 3q_3 + r_3 =3(q_4 + q_3) + (r_4 + r_3)$ so $r_4 + r_3 = 0$ or $r_4 + r_3 = 3$.
If $r_4 = 0$ then $r_3 = 0$.
If $r_4 =1$ then $r_3=2$.
If $r_4 = 2$ then $r_3 =1$.
Was that your question?