Lattice points on $x+y=n$ always visible from the origin.

186 Views Asked by At

Let $m \in \mathbb{Z_{\gt 0}}$ and $\{n \in \mathbb{Z_{\gt 0}}:n\mod 10\}$ = $\{1, 3, 7, 9\}$.

Define

$\Large a_{m} = \frac {5^m-3}2$


Claim

Any lattice points $(x,y)$ of the form

$\Large(\left \lfloor{\frac{n}2}\right \rfloor + a_{m} + 2,\left \lfloor{\frac{n}2}\right \rfloor - a_{m} - 1)$

where $x+y=n$ are always visible from the origin.

Proof

Let

\begin{align*} x=\frac {n}2 + a_{m} + 2\\ y=\frac {n}2 - a_{m} - 1 \end{align*}

Point $(x,y)$ is coprime when

\begin{align*} gcd(x,y)=1 \iff gcd(x+y,x-y)=1 \end{align*}

Calculating

\begin{align*} gcd(x+y,x-y) &= gcd(n,\frac {n}2 + a_{m} + 2 - (\frac {n}2 - a_{m} - 1))\\ &=gcd(n,2a_{m} + 3)\\ &=gcd(n,5^m)\\ &=1\ or \ 5^m\\ \end{align*}

However, the only prime divisor of $5^m$ is $5$ and that is not a factor of $n$, so

\begin{align*} gcd(x+y,x-y) &= 1\\ \end{align*}

Calculating

\begin{align*} gcd(x, y) &= gcd(x−y, y),\ if\ (x > y)\\ &= gcd(\frac {n}2 + a_{m} + 2 - (\frac {n}2 - a_{m} - 1),\frac {n}2 - a_{m} - 1)\\ &=gcd(2a_{m} + 3,\frac {n}2 - a_{m} - 1)\\ &=gcd(5^m,\frac {n}2 - a_{m} - 1)\\ &=5^m\ or \ 1\\ \end{align*}

However, for any integers

\begin{align*} \frac {gcd(x+y, x-y)}{gcd(x,y)} \end{align*}

because anything that divides both $x$ and $y$ divides their sum and difference.

Substituting yields

\begin{align*} \frac {1}{gcd(x,y)} \end{align*}

Therefore

\begin{align*} gcd(x,y) = 1 \end{align*}

$\blacksquare$


Examples

$\xrightarrow{\text{(n = 31, m = 1)}} (18, 13)$
$\xrightarrow{\text{(n = 31, m = 2)}} (28, 3)$

$\xrightarrow{\text{(n = 77777, m = 1)}} (38891, 38886)$
$\xrightarrow{\text{(n = 77777, m = 2)}} (38901, 38876)$

$\xrightarrow{\text{(n = 123456789, m = 10)}} (66611207, 56845582)$
$\xrightarrow{\text{(n = 123456789, m = 11)}} (86142457,37314332)$

$\xrightarrow{\text{(n = 9876543213, m = 12)}} (5060341919, 4816201294)$
$\xrightarrow{\text{(n = 9876543213, m = 13)}} (5548623169, 4327920044)$


Note: I only know basic high-school level maths.

1

There are 1 best solutions below

1
On BEST ANSWER

You are overthinking this.

First, for any integers $$ \gcd(x,y) \text{ divides } \gcd(x+y, x-y) $$ because anything that divides both $x$ and $y$ divides their sum and their difference.

In this question, $x -y$ = $5^m$. It's a little harder to see that $x+y = n$. (Since $n$ is odd, rounding down $n/2$ and doubling yields $n-1$).

The only prime divisor of $5^m$ is $5$ and $5$ is not a factor of $n$ so $\gcd(n, 5^m) = 1$.

Thus $$ \gcd(x,y) \text{ divides } \gcd(n, 5^m) = 1 $$ so $x$ and $y$ are relatively prime.

(Note: be a little careful with odds and evens if you want to use this trick again. $\gcd(5,3) = 1$ but $\gcd(5-3,5+3) = 2$.)