# A simple number theory confirmation

Suppose $a,b\in\Bbb N$ are odd coprime with $a,b>1$ then is it true that if all four of $$x_1a+x_2b,\mbox{ }x_2a-x_1b,\mbox{ }x_1\frac{(a+b)}2+x_2\frac{(a-b)}2,\mbox{ }x_2\frac{(a+b)}2-x_1\frac{(a-b)}2$$ are in $\Bbb Z$ for some $x_1,x_2\in\Bbb R$ then $x_1,x_2\in\Bbb Z$ should hold?

## 4 Answers

Yes. If we set $\alpha = (a+b)/2$ and $\beta=(a-b)/2$, then the lattice generated by the four vectors

$$\binom{\alpha}{\beta},\binom{-\beta}{\alpha},\binom{\alpha+\beta}{\alpha -\beta},\binom{\beta -\alpha}{\alpha +\beta}$$ is contained in the set of $(y_1,y_2) \in \mathbb{Z}^2$ such that $x_1 y_1 + x_2 y_2 \in \mathbb{Z}$.

We thus have to check that these four vectors generate all of $\mathbb{Z}^2$. This is true whenever $\alpha$ and $\beta$ are coprime integers with $\alpha + \beta$ odd. Indeed, these conditions imply that the three integers $\alpha^2 + \beta^2$, $\alpha^2 - 2\alpha \beta - \beta^2$, $\alpha^2 + 2\alpha \beta - \beta^2$ are coprime; this ensures the existence of three integers $u,v,w$ such that the quantity $$\mathrm{det} \left( \binom{\alpha}{\beta},u \binom{-\beta}{\alpha}+v\binom{\alpha+\beta}{\alpha -\beta}+w\binom{\beta -\alpha}{\alpha +\beta} \right) \\= u(\alpha^2 + \beta^2) + v(\alpha^2 - 2\alpha \beta - \beta^2)+w(\alpha^2 + 2\alpha \beta - \beta^2)$$ is equal to $1$ (Bezout's lemma). This shows that the two vectors $$\binom{\alpha}{\beta}, \ \ \mathrm{and} \ \ u \binom{-\beta}{\alpha}+v\binom{\alpha+\beta}{\alpha -\beta}+w\binom{\beta -\alpha}{\alpha +\beta}$$ form an integral basis of $\mathbb{Z}^2$.

• I am not seeing directly since I am not familiar with lattice terminology - why does this show '$x_1,x_2\in\Bbb Z$ has to hold' ? – 1.. Apr 17 '17 at 15:57
• @Turbo, We know that $x_1y_1+x_2y_2$ is an integer whenever $(y_1,y_2)$ is in the group generated by the four vectors. js21 shows that this group includes the vectors $(1,0)$ and $(0,1)$, which implies directly that $x_1=1\cdot x_1+0\cdot x_2$ and $x_2=0\cdot x_1+1\cdot x_2$ are integers. – David Cohen Apr 17 '17 at 17:00
• @js21 Your proof seems to show only $\binom{\alpha}{\beta}$ and two of $$\binom{-\beta}{\alpha},\binom{\alpha+\beta}{\alpha -\beta},\binom{\beta -\alpha}{\alpha +\beta}$$ suffices to form an integral basis of $\mathbb Z^2$. So perhaps the right problem should perhaps be 'if three of $$x_1a+x_2b,\mbox{ }x_2a-x_1b,\mbox{ }x_1\frac{(a+b)}2+x_2\frac{(a-b)}2,\mbox{ }x_2\frac{(a+b)}2-x_1\frac{(a-b)}2$$ are in $\Bbb Z$ for some $x_1,x_2\in\Bbb R$ then $x_1,x_2\in\Bbb Z$ should hold?'? – 1.. Jun 21 '19 at 7:37

Yes, it holds. Here is a different proof. The given conditions are equivalent to $$(a+bi)(x_1-x_2i)\in {\mathbb Z}[i]$$ and $$\left(\frac{a+b}2+\frac{a-b}2i\right)(x_1-x_2i)\in {\mathbb Z}[i].$$ To show that $x_1-x_2i\in {\mathbb Z}[i],$ it suffices to show that $$\gcd\left(a+bi,\frac{a+b}2+\frac{a-b}2i\right)=1~~{\rm in~}{\mathbb Z}[i].$$ Let $\gcd\left(a+bi,\frac{a+b}2+\frac{a-b}2i\right)=\alpha\in {\mathbb Z}[i].$ Since $\frac{a+b}2+\frac{a-b}2i=\frac{1+i}2(a-bi),$ we see that $1+i\nmid \alpha$ (and the same for $1-i=i(1+i)$), for otherwise $(1-i)\left(\frac{a+b}2+\frac{a-b}2i\right)$ would be divisible by 2, but it equals $a-bi$, which is not divible by 2. Now if $\alpha\neq 1$, then there must exist an odd prime $p$ and $u+vi$ such that $u+vi|\alpha$ with $u^2+v^2=p.$ This means that $$u+vi|a+bi~{\rm and~}u+vi|a-bi.$$ By taking conjugate in the factorization of $a+bi$, $u+vi|a+bi$ implies $u-vi|a-bi.$ Therefore both $u+vi$ and $u-vi$ divide $a-bi$, so $$p=(u+vi)(u-vi)|a-bi.$$ This is a contradiction to the fact that $a$ and $b$ are coprime.

Remark 1. The ring ${\mathbb Z}[i]$ is a Euclidean domain, hence a PID and UFD.

Remark 2. For an odd prime $p$ with $p=u^2+v^2=(u+vi)(u-vi)$, the two factors $u+vi$ and $u-vi$ are coprime as the ideal generated by them contains $2u$ and $p$ which generate the unit 1.

• ${ }$ cool proof. – 1.. Apr 17 '17 at 19:23
• I simplified your proof a bit. See my response. – GH from MO Apr 22 '17 at 19:43

Here is a more elementary approach.

Label the $4$ expressions in the question as (1), (2), (3), and (4), in the order they appear. Then subtracting and adding equations (3) and (4) from each other we get new integral expressions; namely, (3'): $x_1a-x_2b$ and (4'): $x_2a+x_1b$. Bring back (1): $x_1a+x_2b$ and (2): $x_2a-x_1b$.

Next, (3')+(1) becomes $2x_1a\in\mathbb{Z}$ and (4')-(2) turns into $2x_1b\in\mathbb{Z}$. Therefore, $2x_1=\frac{a'}a=\frac{b'}b$ for some $a',b'\in\mathbb{Z}$. Since $\gcd(a,b)=1$, the only way $ab'=ba'$ holds is if $a'=\alpha a$ and $b'=\alpha b$. The outcome is $x_1=\frac{\alpha}2$ is a half-integer. A similar argument leads to $x_2=\frac{\beta}2$ is also a half-integer.

Since $a, b$ are odd, $x_1a+x_2b\in\mathbb{Z}$ implies $\alpha, \beta$ are of the same parity. If both $\alpha, \beta$ are odd then (3) can not be an integer because $\frac{a+b}2$ and $\frac{a-b}2$ are of opposite parity. A contradiction. That means $\alpha, \beta$ must be even and hence $x_1, x_2$ are integers, as desired.

• this is more or less what I had come with. – 1.. Apr 17 '17 at 19:43

This is a simplification of Cehrng-tiao Perng's proof. As observed in that proof, it suffices to show that the Gaussian integers $$\gamma:=a+bi\qquad\text{and}\qquad \delta:=\frac{1+i}{2}(a-bi)$$ are coprime. We know that some $\mathbb{Z}$-linear combination of $a$ and $b$ equals $1$, while also $$\gamma+(1-i)\delta=2a\qquad\text{and}\qquad -i\gamma+(1+i)\delta=2b,$$ hence some $\mathbb{Z}[i]$-linear combination of $\gamma$ and $\delta$ equals $2$. This shows that $\gcd(\gamma,\delta)$ divides $2$, hence the only possible common prime divisor of $\gamma$ and $\delta$ is $1+i$. However, $$\frac{\delta}{1+i}=\frac{a-bi}{2}\not\in\mathbb{Z}[i],$$ because $a$ and $b$ are odd integers. Hence $\delta$ is not divisible by $1+i$, and we are done.