3

I had the following exercise: \begin{equation} \begin{cases} n \equiv 1023 \bmod 2015\\ n \equiv 1302 \bmod 2016 \end{cases} \end{equation}

Since $2015$ and $2016$ are coprime, we could use the Chinese Remainder theorem to compute $n$ and then add or substract multiples of $2015 \cdot 2016$ in order to find $n$. However, this seemed a quite large computation to me, so I computed that $\text{gcd}(2015, 1023) = 31$ and $\text{gcd}(2016, 1302) = 42$. Since $2015$ divides $1023 - n$, we must have that $31$ divides $1023 - n$, which would result in $n \equiv 1023 \equiv 0 \bmod 31$, since $31$ divides $1023$. In the same way, I would get that $n \equiv 0 \bmod 42$. But this would give as a solution that $n = 0$ (or $31 \cdot 42$ depending on whether we treat $0$ as a natural number), but this is clearly not correct...

I have no idea where I made an error, so my questions are:

[1] Where did I make a mistake

[2] This method I used is clearly not right, so how could I simplify the given system of congruences to something which is easier to compute?

Thank you in advance

Bill Dubuque
  • 272,048
Student
  • 4,438
  • 2
    What you have deduced is that $n$ is a multiple of $31\times42$. – Gerry Myerson Feb 16 '17 at 11:15
  • Oke, so what I did was not really helpful, since this would leave me with checking multiples of $31 \cdot 42$ in both of the original congruences? Is there any way to reduce the numbers in my original system of congruences to something which is easier to compute? (In our prove of the Chinese Remainder theorem, we saw that $n \equiv [2015]^{-1}{2016}\cdot 2015\cdot 1023 + [2016]^{-1}{2015} \cdot 2016 \cdot 1302 \mod (2015 \cdot 2016)$ which is impossible to compute... – Student Feb 16 '17 at 11:22
  • 1
    @Student Because of the difference of $1$, there is a possibility to find the solution quickly (see the answer below) – Peter Feb 16 '17 at 12:45
  • 1
    What you did was helpful, and it does give you a way to reduce the numbers. What you know is $n=(31)(42)m$ for some unknown $m$. So, your first congruence is $(31)(42)m\equiv(31)(33)\bmod{(31)(65)}$, which reduces to $42m\equiv33\bmod{65}$, and similarly the second congruence reduces to $31m\equiv31\bmod{48}$. – Gerry Myerson Feb 16 '17 at 21:54

2 Answers2

2

It's an easy inverse case of CRT, i.e. one modulus is $\equiv 1\,$ mod the other, so the $\rm\color{#c00}{inverse}$ in the CRT formula is trivial to compute, e.g. specializing $ $ Easy CRT $ $ with $\rm\,\color{#c00}m\equiv \pm1\pmod{\! n}\,$ yields

Theorem $\ $(Easy CRT) $\rm\,\ $ If $\rm\ m,\,n\:$ are coprime integers then

$\ \ \ \qquad\qquad\qquad\quad\qquad\qquad\displaystyle\begin{align}&\rm x\equiv a\!\!\pmod{\!m}\\ &\rm x\equiv b\!\!\pmod{\! n}\end{align}$ $\displaystyle\! \iff\rm x \equiv a + m \bigg[\frac{\color{#0a0}{b-a}}{\color{#c00}m}\ mod\ n\bigg]\!\!\!\pmod{\!mn}$


$\rm {\rm if}\ \ m\equiv \pm1\pmod{\!n}\,\ \ {\rm then}\ \ \begin{align}&\rm x\equiv a\!\!\pmod{\!m}\\ &\rm x\equiv b\!\!\pmod{\! n}\end{align}$ $\!\iff \rm x^{\phantom{|^{|}}}\!\!\! \equiv a \pm m\,(\color{#0a0}{b-a})\,\ \pmod{\!mn}$


Hence we conclude that: $\ \begin{align}&\rm x\equiv a\!\!\pmod{\!2016}\\ &\rm x\equiv b\!\!\pmod{\! 2015}\end{align}\!\iff \rm x \equiv a + 2016\,(b\!-\!a)\,\ \pmod{\!2016\cdot 2015}$

OP is the special case $\rm\,a = 1023,\ b = 1302.\,$

Bill Dubuque
  • 272,048
1

We search numbers $s,t$ with $$n=2015s+1023=2016t+1302$$

Taking this modulo $2015$ gives

$$1023=t+1302$$ immediately giving $t=-279\equiv 1736\mod 2015$

Hence, we have $n=2016\cdot 1736+1302=3501078$

Peter
  • 84,454