2

Note: This is not a duplicate of Understanding a proof that $17\mid (2x+3y)$ iff $17\mid(9x +5y)$ or Understanding a proof that $2x + 3y$ is divisible by $17$ iff $9x + 5y$ is divisible by $17$.

I was reading through Naoki Sato's notes on number theory. I am somewhat unsatisfied with the given solution to this problem:

Example. Let $x$ and $y$ be integers. Prove that $2x + 3y$ is divisible by $17$ iff $9x + 5y$ is divisible by $17$.

Solution. $17 \mid 2x + 3y \Rightarrow 17 \mid 13(2x + 3y)$, or $17 \mid 26x + 39y \Rightarrow 17 \mid 9x + 5y$, and conversely, $17 \mid 9x + 5y \Rightarrow 17 \mid 4(9x + 5y)$, or $17 \mid 36x + 20y \Rightarrow 17 \mid 2x + 3y$.

I do understand the solution but it seems like an unmotivated approach. How would one get the numbers $13$ and $4$ except for clever guessing? Is there a general method for solving such problems? That is, some theorem that trivializes such problems. I don't know much about modular arithmetic but I've noticed that $13$ and $4$ are inverses modulo $17$, i.e. $17 \cdot 4 \equiv 1 \pmod{17}$. I believe it might have something to do with that.

  • The invertibility is why it's if and only if. Since $17$ is prime all non-zero elements are invertible. This allows you to solve for $x$ in terms of $y$ and vice versa because $2x + 3y \equiv0 \mod 17$. Do the same with $9x+5y$ and compare the answers. – CyclotomicField Feb 18 '24 at 00:35
  • See also https://math.stackexchange.com/questions/3046318/17-29x-18y-implies-17-23x-9y – lhf Feb 18 '24 at 00:53
  • You get 13 from solving $ 2 a \equiv 9 \pmod{17}$, and you get 4 from solving $ 9b \equiv 2 \pmod{17}$. This also explains why $ ab \equiv 1 \pmod{17}$ like you observed. – Calvin Lin Feb 18 '24 at 03:03
  • As mentioned in the dupes, scaling by a unit (invertible) $,s,$ always yields an equivalent divisibility (or congruence), thus $,s(\color{#0a0}5y+\color{#c00}9x) \equiv \color{#0a0}3y+\color{#c00}2x\Rightarrow \color{#0a0}5s\equiv \color{#0a0}3\equiv 20\Rightarrow s\equiv 4,,$ and this works since it equalizes the $\rm\color{#c00}{coef}$ of $x$ too, i.e. $,\color{#c00}9s\equiv 9(4)\equiv\color{#c00}2,,$ and $4$ is coprime to $17$ so is invertible. There are various equivalent ways of viewing this, likely all of which can be found in the dupes (and their links). $\ \ $ – Bill Dubuque Feb 18 '24 at 11:13

3 Answers3

1

Let $(c,d)$ be an ordered pair in $((\mathbb{Z}/17\mathbb{Z})^*)^2$, and let $(x,y)$ is be any pair of integers s.t. $cx+dy$ is divisible by $17$. Then let $(c',d')$ be another pair in $((\mathbb{Z}/17\mathbb{Z})^*)^2$. Then $c'x+d'y$ is also divisible by $17$ iff either:

  • There is an element $a \in (\mathbb{Z}/17 \mathbb{Z})^*$ such that $(ac,ad)=(c',d')$, or

  • Both $x$ and $y$ are each divisible by $17$.

This is a straightforward exercise to check. Note that $17$ can be replaced by any prime $q$. Furthermore, this leads to a fast algorithm to check, as for any prime $q$, the equation $c=ac'$ can be solved for $a$ in time polylog$(q)$, and then it is straightforward to check whether the equation $d=ad'$ holds mod $q$.

Mike
  • 23,484
1

Remember that if $17|2x+3y$, this is the same as saying $2x+3y\equiv 0\mod(17)$, and therefore $2x\equiv -3y\mod(17)$. Solving for $x$ requires the multiplicative inverse of $2\mod(17)$, which happens to be $9$. Therefore $x\equiv -(3\cdot9)y= -27y\equiv -10y\equiv 7y\mod(17)$

Now we do the same for the other divisibility statement: $17|9x+5y\Longrightarrow 9x\equiv -5\mod(17)$. We already know that $2$ and $9$ are multiplicative inverses $\mod(17)$, so this is equivalent to $x\equiv-10y\equiv 7y\mod(17)$.

Hang on, that's the same as what we got before! This means that assuming one of $2x+3y$ or $9x+5y$ to be divisible by $17$ leads to the other being divisible by it also, thus proving the claim.

Addendum: I got carried away with my method and forgot to answer the question you actually asked. $4$ and $13$ come from solving either $2m\equiv 9\mod(17)$ or $3n\equiv 5\mod(17)$. Solving the first requires the inverse of $2\mod(17)$, which we already know to be $9$; therefore $2m\equiv \frac{1}{2}\mod(17)\Longrightarrow m\equiv \frac{1}{4}\mod(17)$. The inverse of $4\mod(17)$ is $13$, so we conclude that $m\equiv 13\mod(17)$.

Now, solving for $n$ in $3n\equiv 5\mod(17)$ leads to $n\equiv\frac{1}{3}\cdot5\mod(17)$. The multiplicative inverse of $3\mod(17)$ is $6$, so we have $n\equiv6\cdot5=30\equiv 13\mod(17)$.

Thus $m=n$. What we have just done is found (and confirmed) the unique integer $k$ such that $k(2x+3y)\equiv 9x+5y\mod(17)$. This of course means that $2x+3y\equiv\frac{1}{k}(9x+5y)\mod(17)$, and if $13$ is substituted for $k$, we get $13(2x+3y)\equiv9x+5y\mod(17)$ and $2x+3y\equiv4(9x+5y)\mod(17)$. Since they are integer multiples of each other $\mod(17)$, assuming one to be an integer multiple of $17$ leads to the other being an integer multiple of $17$, i.e. they are both divisible by $17$.

In general: if you have $ax+by\equiv cx+dy\mod(p)$, where $p$ is a prime, then it is true that $p|ax+by$ and $p|cx+dy$ if and only if $a^{-1}c\equiv b^{-1}{d}\mod(p)$.

1

I think a variation of Euclid's GCD algorithm can help out.

Line 1: $9x+5y=4(2x+3y)+x-7y$

Line 2: $2x+3y=2(x-7y)+17y$

Stop here since one of the coefficients of x or y is 0.

Suppose 17 divides $2x+3y$, then it must divide $(x-7y)$ by line 2. If it divides both, 17 must also divide $(9x+5y)$ by line 1.

Combine the lines to get $(9x+5y)=4[2(x-7y)+17y]+x-7y=9(x-7y)+4 \cdot 17y$

So if $17$ divides $9x+5y$, it also divides $(x-7y)$. But by line 2, If 17 divides $(x-7y)$ then it divides $(2x+3y)$.

TurlocTheRed
  • 6,458