Books Number Theory

Numbers and Sequences

Axiom 1.1Well-ordering principle
Every nonempty subset of Z+{\mathbb{Z}}^{+} has a least element. That is, if 𝑆⊆Z+𝑆\subseteq {\mathbb{Z}}^{+} and 𝑆≠∅𝑆\neq \emptyset , then ∃𝑚∈𝑆,∀𝑠∈𝑆,𝑚≤𝑠\exists 𝑚\in 𝑆,\forall 𝑠\in 𝑆,𝑚\leq 𝑠.

We take the well-ordering principle as an axiom here. It can equally well be derived from a different collection of axioms that does not include it.

In time we will see that this principle is extremely useful in proofs. Existence is often the hard part. The well-ordering principle is especially helpful then: we carefully construct a nonempty subset of Z+{\mathbb{Z}}^{+} whose least element is the number we care about, and conclude that such a number exists.

In some cases it is more convenient to construct a subset of N\mathbb{N}, or more generally a subset of {𝑛∈Z:𝑛≥𝑘}\{𝑛\in \mathbb{Z}:𝑛\geq 𝑘\}, where 𝑘𝑘 is any given integer. This is a variant of the well-ordering principle, and it may be useful in some proofs.

Proposition 1.1

Let 𝑘∈Z𝑘\in \mathbb{Z} be given and let 𝑆𝑆 be a nonempty subset of {𝑛∈Z:𝑛≥𝑘}\{𝑛\in \mathbb{Z}:𝑛\geq 𝑘\}. Then there exists a least integer in 𝑆𝑆.

In particular, every nonempty subset of the natural numbers N\mathbb{N} has a least element.

Proof

Construct the set

𝑇={𝑛−𝑘+1:𝑛∈𝑆}.𝑇=\{𝑛-𝑘+1:𝑛\in 𝑆\}.

Note that 𝑇𝑇 is a subset of Z+{\mathbb{Z}}^{+}, since 𝑛≥𝑘𝑛\geq 𝑘 for all 𝑛∈𝑆𝑛\in 𝑆. Since 𝑆𝑆 is nonempty, so is 𝑇𝑇. By the well-ordering principle, there exists a least integer 𝑡𝑡 in 𝑇𝑇. There exists 𝑠∈𝑆𝑠\in 𝑆 such that 𝑡=𝑠−𝑘+1𝑡=𝑠-𝑘+1. We want to show that 𝑠𝑠 is the least element of 𝑆𝑆. Let 𝑚𝑚 be any integer in 𝑆𝑆. Then 𝑚−𝑘+1𝑚-𝑘+1 is in 𝑇𝑇. Since 𝑡𝑡 is the least element of 𝑇𝑇,

𝑚−𝑘+1≤𝑡=𝑠−𝑘+1,𝑚-𝑘+1\leq 𝑡=𝑠-𝑘+1,

so 𝑚≤𝑠𝑚\leq 𝑠. Thus 𝑠𝑠 is the least element of 𝑆𝑆.

Basic Properties of Floor Functions

Definition 1.1
The floor of a real number 𝑥∈R𝑥\in \mathbb{R}, denoted ⌊𝑥⌋\lfloor 𝑥\rfloor , is the greatest integer not exceeding 𝑥𝑥. The fractional part is {𝑥}=𝑥−⌊𝑥⌋\{𝑥\}=𝑥-\lfloor 𝑥\rfloor .

The definition already asserts that such an integer exists. The well-ordering principle produces it, if you wish.

For example, ⌊1.414⌋=1\lfloor 1.414\rfloor =1 and {1.414}=0.414\{1.414\}=0.414; ⌊1⌋=1\lfloor 1\rfloor =1 and {1}=0\{1\}=0; ⌊π⌋=3\lfloor \pi \rfloor =3; ⌊−1.1⌋=−2\lfloor -1.1\rfloor =-2 and {−1.1}=0.9\{-1.1\}=0.9.

Every real number can be written uniquely as an integer plus a remainder in [0,1)[0,1):

𝑥=⌊𝑥⌋+{𝑥},⌊𝑥⌋∈Z,{𝑥}∈[0,1).𝑥=\lfloor 𝑥\rfloor +\{𝑥\},\quad \lfloor 𝑥\rfloor \in \mathbb{Z},\quad \{𝑥\}\in [0,1).

In particular,

𝑥∈Z⇔{𝑥}=0⇔⌊𝑥⌋=𝑥.𝑥\in \mathbb{Z}\quad ⇔\quad \{𝑥\}=0\quad ⇔\quad \lfloor 𝑥\rfloor =𝑥.

This splitting is the ground everything else grows from.

How far is ⌊𝑥⌋\lfloor 𝑥\rfloor from 𝑥𝑥? Directly from the definition,

⌊𝑥⌋≤𝑥<⌊𝑥⌋+1.\lfloor 𝑥\rfloor \leq 𝑥<\lfloor 𝑥\rfloor +1.

Equivalently,

𝑥−1<⌊𝑥⌋≤𝑥,𝑥-1<\lfloor 𝑥\rfloor \leq 𝑥,

which is the form we use when we estimate.

Proposition 1.2
If 𝑛∈Z𝑛\in \mathbb{Z} and 𝑛≤𝑥<𝑛+1𝑛\leq 𝑥<𝑛+1, then 𝑛=⌊𝑥⌋𝑛=\lfloor 𝑥\rfloor .
Proof

Taking the negative signs over

⌊𝑥⌋≤𝑥<⌊𝑥⌋+1\lfloor 𝑥\rfloor \leq 𝑥<\lfloor 𝑥\rfloor +1

yields

−⌊𝑥⌋−1<−𝑥≤−⌊𝑥⌋-\lfloor 𝑥\rfloor -1<-𝑥\leq -\lfloor 𝑥\rfloor

Add into

𝑛≤𝑥<𝑛+1,𝑛\leq 𝑥<𝑛+1,

we have

𝑛−⌊𝑥⌋−1<0<𝑛−⌊𝑥⌋+1.𝑛-\lfloor 𝑥\rfloor -1<0<𝑛-\lfloor 𝑥\rfloor +1.

Therefore,

−1<𝑛−⌊𝑥⌋<1.-1<𝑛-\lfloor 𝑥\rfloor <1.

Since 𝑛−⌊𝑥⌋∈Z𝑛-\lfloor 𝑥\rfloor \in \mathbb{Z}, we must have 𝑛−⌊𝑥⌋=0𝑛-\lfloor 𝑥\rfloor =0, i.e., 𝑛=⌊𝑥⌋𝑛=\lfloor 𝑥\rfloor .

What happens if we shift, compare, or nest?

We may pull the integers out of the floor function.

Proposition 1.3

For every 𝑥∈R𝑥\in \mathbb{R} and every 𝑛∈Z𝑛\in \mathbb{Z},

⌊𝑥+𝑛⌋=⌊𝑥⌋+𝑛.\lfloor 𝑥+𝑛\rfloor =\lfloor 𝑥\rfloor +𝑛.
Proof

Add 𝑛𝑛 into

⌊𝑥⌋≤𝑥<⌊𝑥⌋+1\lfloor 𝑥\rfloor \leq 𝑥<\lfloor 𝑥\rfloor +1

, we have

⌊𝑥⌋+𝑛≤𝑥+𝑛<(⌊𝑥⌋+𝑛)+1.\lfloor 𝑥\rfloor +𝑛\leq 𝑥+𝑛<(\lfloor 𝑥\rfloor +𝑛)+1.

By Proposition 1.2, ⌊𝑥⌋+𝑛=⌊𝑥+𝑛⌋\lfloor 𝑥\rfloor +𝑛=\lfloor 𝑥+𝑛\rfloor .

The floor function is non-decreasing.

Proposition 1.4Monotonicity
If 𝑥<𝑦𝑥<𝑦, then ⌊𝑥⌋≤⌊𝑦⌋\lfloor 𝑥\rfloor \leq \lfloor 𝑦\rfloor .
Proof

We have

⌊𝑥⌋≤𝑥<𝑦<⌊𝑦⌋+1.\lfloor 𝑥\rfloor \leq 𝑥<𝑦<\lfloor 𝑦\rfloor +1.

Therefore,

⌊𝑥⌋<⌊𝑦⌋+1.\lfloor 𝑥\rfloor <\lfloor 𝑦\rfloor +1.

Since ⌊𝑥⌋\lfloor 𝑥\rfloor and ⌊𝑦⌋+1\lfloor 𝑦\rfloor +1 are integers, we must have ⌊𝑥⌋≤⌊𝑦⌋\lfloor 𝑥\rfloor \leq \lfloor 𝑦\rfloor .

Applying the floor twice yields the same result as applying it once, so does the fraction function.

Proposition 1.5Idempotence
⌊⌊𝑥⌋⌋=⌊𝑥⌋\lfloor \lfloor 𝑥\rfloor \rfloor =\lfloor 𝑥\rfloor and {{𝑥}}={𝑥}\{\{𝑥\}\}=\{𝑥\}.

Addition is the operation that matters. The correction is only 00 or 11.

Proposition 1.6Additive inequality

For all 𝑥,𝑦∈R𝑥,𝑦\in \mathbb{R},

⌊𝑥⌋+⌊𝑦⌋≤⌊𝑥+𝑦⌋≤⌊𝑥⌋+⌊𝑦⌋+1.\lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor \leq \lfloor 𝑥+𝑦\rfloor \leq \lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor +1.
(1.1)
Proof

Write

𝑥=⌊𝑥⌋+{𝑥}𝑦=⌊𝑦⌋+{𝑦}.𝑥=\lfloor 𝑥\rfloor +\{𝑥\}\quad 𝑦=\lfloor 𝑦\rfloor +\{𝑦\}.

We have

𝑥+𝑦=(⌊𝑥⌋+⌊𝑦⌋)+({𝑥}+{𝑦}).𝑥+𝑦=(\lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor )+(\{𝑥\}+\{𝑦\}).

Note that 0≤{𝑥}+{𝑦}<20\leq \{𝑥\}+\{𝑦\}<2.

If {𝑥}+{𝑦}<1\{𝑥\}+\{𝑦\}<1, then {𝑥}+{𝑦}\{𝑥\}+\{𝑦\} is precisely the fraction part of 𝑥+𝑦𝑥+𝑦. Thus, ⌊𝑥+𝑦⌋=⌊𝑥⌋+⌊𝑦⌋\lfloor 𝑥+𝑦\rfloor =\lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor .

On the other hand, if 1≤{𝑥}+{𝑦}<21\leq \{𝑥\}+\{𝑦\}<2, then the fraction part of 𝑥+𝑦𝑥+𝑦 is {𝑥}+{𝑦}−1\{𝑥\}+\{𝑦\}-1. Consequently, ⌊𝑥+𝑦⌋=⌊𝑥⌋+⌊𝑦⌋+1\lfloor 𝑥+𝑦\rfloor =\lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor +1.

Therefore, ⌊𝑥+𝑦⌋\lfloor 𝑥+𝑦\rfloor is either ⌊𝑥⌋+⌊𝑦⌋\lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor or ⌊𝑥⌋+⌊𝑦⌋+1\lfloor 𝑥\rfloor +\lfloor 𝑦\rfloor +1, which implies that (1.1) holds.

As a byproduct,

{𝑥+𝑦}={{𝑥}+{𝑦}}.\{𝑥+𝑦\}=\{\{𝑥\}+\{𝑦\}\}.
Proof

We have seen that if {𝑥}+{𝑦}<1\{𝑥\}+\{𝑦\}<1, then {𝑥}+{𝑦}\{𝑥\}+\{𝑦\} is precisely the fraction part of 𝑥+𝑦𝑥+𝑦, i.e., {𝑥+𝑦}={𝑥}+{𝑦}\{𝑥+𝑦\}=\{𝑥\}+\{𝑦\}. Take fraction on both sides and apply Proposition 1.5,

{𝑥+𝑦}={{𝑥+𝑦}}={{𝑥}+{𝑦}}.\{𝑥+𝑦\}=\{\{𝑥+𝑦\}\}=\{\{𝑥\}+\{𝑦\}\}.

If 1≤{𝑥}+{𝑦}<21\leq \{𝑥\}+\{𝑦\}<2, then we have seen that the fraction part of 𝑥+𝑦𝑥+𝑦 is {𝑥}+{𝑦}−1\{𝑥\}+\{𝑦\}-1, i.e., {𝑥+𝑦}={𝑥}+{𝑦}−1\{𝑥+𝑦\}=\{𝑥\}+\{𝑦\}-1. Move the 11 to the LHS,

1+{𝑥+𝑦}={𝑥}+{𝑦}.1+\{𝑥+𝑦\}=\{𝑥\}+\{𝑦\}.

Note that LHS can be regard as a decomposition of the greatest integer part 11 and the fraction part {𝑥+𝑦}\{𝑥+𝑦\} of the real number 1+{𝑥+𝑦}1+\{𝑥+𝑦\}. Take the fraction on both sides,

{𝑥+𝑦}={1+{𝑥+𝑦}}={{𝑥}+{𝑦}}.\{𝑥+𝑦\}=\{1+\{𝑥+𝑦\}\}=\{\{𝑥\}+\{𝑦\}\}.

Subtraction is the same idea, with a sign to watch:

⌊𝑥⌋−⌊𝑦⌋−1≤⌊𝑥−𝑦⌋≤⌊𝑥⌋−⌊𝑦⌋,\lfloor 𝑥\rfloor -\lfloor 𝑦\rfloor -1\leq \lfloor 𝑥-𝑦\rfloor \leq \lfloor 𝑥\rfloor -\lfloor 𝑦\rfloor ,
(1.2)

and

{𝑥−𝑦}={{𝑥}−{𝑦}}.\{𝑥-𝑦\}=\{\{𝑥\}-\{𝑦\}\}.
(1.3)
Proof

Substitude 𝑥←𝑥−𝑦𝑥←𝑥-𝑦 in (1.1),

⌊𝑥−𝑦⌋+⌊𝑦⌋≤⌊𝑥⌋≤⌊𝑥−𝑦⌋+⌊𝑦⌋+1.\lfloor 𝑥-𝑦\rfloor +\lfloor 𝑦\rfloor \leq \lfloor 𝑥\rfloor \leq \lfloor 𝑥-𝑦\rfloor +\lfloor 𝑦\rfloor +1.

Rearranging the terms, we get (1.2).

Write

𝑥−𝑦=(⌊𝑥⌋−⌊𝑦⌋)+({𝑥}−{𝑦}).𝑥-𝑦=(\lfloor 𝑥\rfloor -\lfloor 𝑦\rfloor )+(\{𝑥\}-\{𝑦\}).

Note that −1<{𝑥}−{𝑦}<1-1<\{𝑥\}-\{𝑦\}<1.

If {𝑥}−{𝑦}≥0\{𝑥\}-\{𝑦\}\geq 0, then {𝑥}−{𝑦}\{𝑥\}-\{𝑦\} is the fraction part of 𝑥−𝑦𝑥-𝑦, i.e., {𝑥−𝑦}={𝑥}−{𝑦}\{𝑥-𝑦\}=\{𝑥\}-\{𝑦\}. And then take the fraction on both sides,

{𝑥−𝑦}={{𝑥−𝑦}}={{𝑥}−{𝑦}}.\{𝑥-𝑦\}=\{\{𝑥-𝑦\}\}=\{\{𝑥\}-\{𝑦\}\}.

The other case is that −1<{𝑥}−{𝑦}<0-1<\{𝑥\}-\{𝑦\}<0, equivalently, 0<{𝑥}−{𝑦}+1<10<\{𝑥\}-\{𝑦\}+1<1. Then {𝑥}−{𝑦}+1\{𝑥\}-\{𝑦\}+1 is the fraction part of 𝑥−𝑦𝑥-𝑦, i.e., {𝑥−𝑦}={𝑥}−{𝑦}+1\{𝑥-𝑦\}=\{𝑥\}-\{𝑦\}+1. Move 11 to the LHS,

−1+{𝑥−𝑦}={𝑥}−{𝑦}.-1+\{𝑥-𝑦\}=\{𝑥\}-\{𝑦\}.

Take the fraction on both sides,

{𝑥−𝑦}={−1+{𝑥−𝑦}}={{𝑥}−{𝑦}}.\{𝑥-𝑦\}=\{-1+\{𝑥-𝑦\}\}=\{\{𝑥\}-\{𝑦\}\}.

Negatives are easy to get wrong, so we leave them until the rest is in place.

Proposition 1.7
⌊−𝑥⌋={−⌊𝑥⌋ if 𝑥∈Z−⌊𝑥⌋−1 if 𝑥∉Zand{−𝑥}={0 if 𝑥∈Z1−{𝑥} if 𝑥∉Z.\lfloor -𝑥\rfloor =\begin{cases}-\lfloor 𝑥\rfloor \, & \text{if}\, 𝑥\in \mathbb{Z} \\ -\lfloor 𝑥\rfloor -1\, & \text{if}\, 𝑥\notin \mathbb{Z}\end{cases}\quad \text{and}\quad \{-𝑥\}=\begin{cases}0\, & \text{if}\, 𝑥\in \mathbb{Z} \\ 1-\{𝑥\}\, & \text{if}\, 𝑥\notin \mathbb{Z}\end{cases}.
Proof

Write 𝑥=⌊𝑥⌋+{𝑥}𝑥=\lfloor 𝑥\rfloor +\{𝑥\}. Apply the negative sign over to both sides,

−𝑥=−⌊𝑥⌋−{𝑥}.-𝑥=-\lfloor 𝑥\rfloor -\{𝑥\}.

If 𝑥∈Z𝑥\in \mathbb{Z}, then ⌊−𝑥⌋=−⌊𝑥⌋\lfloor -𝑥\rfloor =-\lfloor 𝑥\rfloor and {−𝑥}=0\{-𝑥\}=0.

If 𝑥∉Z𝑥\notin \mathbb{Z}, we have

−𝑥=(−⌊𝑥⌋−1)+(1−{𝑥}).-𝑥=(-\lfloor 𝑥\rfloor -1)+(1-\{𝑥\}).

Note that 0<1−{𝑥}<10<1-\{𝑥\}<1, which means it is the fraction part of −𝑥-𝑥. Thus, ⌊−𝑥⌋=−⌊𝑥⌋−1\lfloor -𝑥\rfloor =-\lfloor 𝑥\rfloor -1 and {−𝑥}=1−{𝑥}\{-𝑥\}=1-\{𝑥\}

Definition 1.2

The ceiling of 𝑥∈R𝑥\in \mathbb{R} is

⌈𝑥⌉=−⌊−𝑥⌋.\lceil 𝑥\rceil =-\lfloor -𝑥\rfloor .

Then ⌈𝑥⌉−⌊𝑥⌋\lceil 𝑥\rceil -\lfloor 𝑥\rfloor is 00 or 11.

Diophantine Approximation

Theorem 1.1The pigeonhole principle
If 𝑘+1𝑘+1 or more objects are placed into 𝑘𝑘 boxes, then at least one box contains two or more objects.
Proof
We prove by contradiction. Suppose box 𝑖𝑖 contains 𝑛𝑖{𝑛}_{𝑖} objects, for 𝑖=1,…,𝑘𝑖=1,\ldots ,𝑘. Assume that every box contains at most one object, i.e., 𝑛𝑖≤1{𝑛}_{𝑖}\leq 1 for all 𝑖=1,…,𝑘𝑖=1,\ldots ,𝑘. Then in total there are 𝑛=𝑛1+⋯+𝑛𝑘≤𝑘𝑛={𝑛}_{1}+\cdots +{𝑛}_{𝑘}\leq 𝑘 objects, a contradiction. Therefore there exists 𝑖∈{1,…,𝑘}𝑖\in \{1,\ldots ,𝑘\} such that 𝑛𝑖≥2{𝑛}_{𝑖}\geq 2.

For example, if a company has more than 366366 people, then two of them must share the same birthday.

Theorem 1.2Dirichlet's approximation theorem

Let 𝑥∈R𝑥\in \mathbb{R} and 𝑛∈Z+𝑛\in {\mathbb{Z}}^{+}, then there exist 𝑎,𝑏∈Z𝑎,𝑏\in \mathbb{Z} with 1≤𝑎≤𝑛1\leq 𝑎\leq 𝑛 such that

∣𝑎𝑥−𝑏∣<1𝑛+1.|𝑎𝑥-𝑏|<\frac{1}{𝑛+1}.
(1.4)

I picture two rulers, left end against left end. The reference has ticks of unit 11: the integers. The target has ticks of unit 𝑥𝑥, generally a different length. We start them together at 00 and read along.

integers (reference)
0 1 2 3
|--------------|--------------|--------------|
|----------|----------|----------|----------|
0 x 2x 3x 4x
multiples of x (target) ^

For any error 1/(𝑛+1)1/(𝑛+1), among the first 𝑛𝑛 ticks of the target some tick sits within that error of a tick on the reference.

Proof

Divide [0,1][0,1] evenly into 𝑛+1𝑛+1 buckets, the intervals

[0,1𝑛+1),[1𝑛+1,2𝑛+1),…,[𝑛𝑛+1,1]\left[0,\frac{1}{𝑛+1}\right),\left[\frac{1}{𝑛+1},\frac{2}{𝑛+1}\right),\ldots ,\left[\frac{𝑛}{𝑛+1},1\right]

with the last one closed. They partition [0,1][0,1].

Now consider the 𝑛+2𝑛+2 numbers

𝐴=(0,{𝑥},{2𝑥},…,{𝑛𝑥},1).𝐴=(0,\{𝑥\},\{2𝑥\},\ldots ,\{𝑛𝑥\},1).

Here 𝐴𝐴 is a list rather than a set, since there may be duplicates. All 𝑛+2𝑛+2 of them lie in [0,1][0,1]. Put them into the 𝑛+1𝑛+1 buckets. By the pigeonhole principle Theorem 1.1, at least two fall into the same bucket. There are three cases.

Case 11. [0,1/(𝑛+1))[0,1/(𝑛+1)) contains at least two of 𝐴𝐴. 00 is certainly one of them; 11 cannot be. So {𝑎𝑥}∈[0,1/(𝑛+1))\{𝑎𝑥\}\in [0,1/(𝑛+1)) for some 𝑎∈{1,…,𝑛}𝑎\in \{1,\ldots ,𝑛\}. We have

𝑎𝑥−⌊𝑎𝑥⌋={𝑎𝑥}<1𝑛+1.𝑎𝑥-\lfloor 𝑎𝑥\rfloor =\{𝑎𝑥\}<\frac{1}{𝑛+1}.

Let 𝑏=⌊𝑎𝑥⌋𝑏=\lfloor 𝑎𝑥\rfloor and (1.4) holds.

Case 22. [𝑛/(𝑛+1),1][𝑛/(𝑛+1),1] contains at least two of 𝐴𝐴. 11 is certainly one of them; 00 cannot be. So {𝑎𝑥}∈[𝑛/(𝑛+1),1]\{𝑎𝑥\}\in [𝑛/(𝑛+1),1] for some 𝑎∈{1,…,𝑛}𝑎\in \{1,\ldots ,𝑛\}. We have

1−{𝑎𝑥}<1𝑛+1.1-\{𝑎𝑥\}<\frac{1}{𝑛+1}.

Write {𝑎𝑥}=𝑎𝑥−⌊𝑎𝑥⌋\{𝑎𝑥\}=𝑎𝑥-\lfloor 𝑎𝑥\rfloor and rearrange:

∣𝑎𝑥−(1+⌊𝑎𝑥⌋)∣<1𝑛+1|𝑎𝑥-(1+\lfloor 𝑎𝑥\rfloor )|<\frac{1}{𝑛+1}

Let 𝑏=1+⌊𝑎𝑥⌋𝑏=1+\lfloor 𝑎𝑥\rfloor and (1.4) holds.

Case 33. This is the interesting part. Suppose neither [0,1/(𝑛+1))[0,1/(𝑛+1)) nor [𝑛/(𝑛+1),1][𝑛/(𝑛+1),1] contains at least two numbers of 𝐴𝐴. Then some interval

𝐼=[𝑘𝑛+1,𝑘+1𝑛+1)𝐼=\left[\frac{𝑘}{𝑛+1},\frac{𝑘+1}{𝑛+1}\right)

with 𝑘∈{1,…,𝑛−1}𝑘\in \{1,\ldots ,𝑛-1\} contains at least two numbers of 𝐴𝐴. It cannot contain 00 or 11. So there exist 𝑎1,𝑎2∈{1,…,𝑛}{𝑎}_{1},{𝑎}_{2}\in \{1,\ldots ,𝑛\} with 𝑎1≠𝑎2{𝑎}_{1}\neq {𝑎}_{2} such that {𝑎1𝑥}\{{𝑎}_{1}𝑥\} and {𝑎2𝑥}\{{𝑎}_{2}𝑥\} both lie in 𝐼𝐼. Their distance is then less than 1/(𝑛+1)1/(𝑛+1):

∣{𝑎1𝑥}−{𝑎2𝑥}∣<1𝑛+1.|\{{𝑎}_{1}𝑥\}-\{{𝑎}_{2}𝑥\}|<\frac{1}{𝑛+1}.

Without loss of generality, {𝑎1𝑥}≥{𝑎2𝑥}\{{𝑎}_{1}𝑥\}\geq \{{𝑎}_{2}𝑥\}. Thus

0≤{𝑎1𝑥}−{𝑎2𝑥}<1𝑛+1.0\leq \{{𝑎}_{1}𝑥\}-\{{𝑎}_{2}𝑥\}<\frac{1}{𝑛+1}.

The fractional part of a number already in [0,1)[0,1) is itself, so

{{𝑎1𝑥}−{𝑎2𝑥}}<1𝑛+1.\{\{{𝑎}_{1}𝑥\}-\{{𝑎}_{2}𝑥\}\}<\frac{1}{𝑛+1}.

By (1.3) we obtain

{(𝑎1−𝑎2)𝑥}<1𝑛+1\{({𝑎}_{1}-{𝑎}_{2})𝑥\}<\frac{1}{𝑛+1}

since {{𝑎1𝑥}−{𝑎2𝑥}}={𝑎1𝑥−𝑎2𝑥}\{\{{𝑎}_{1}𝑥\}-\{{𝑎}_{2}𝑥\}\}=\{{𝑎}_{1}𝑥-{𝑎}_{2}𝑥\}.

If 𝑎1>𝑎2{𝑎}_{1}>{𝑎}_{2}, let 𝑎=𝑎1−𝑎2𝑎={𝑎}_{1}-{𝑎}_{2}. Clearly 1≤𝑎<𝑛1\leq 𝑎<𝑛. Then

{𝑎𝑥}<1𝑛+1.\{𝑎𝑥\}<\frac{1}{𝑛+1}.

The same argument as in Case 11 finishes it.

If 𝑎1<𝑎2{𝑎}_{1}<{𝑎}_{2}, let 𝑎=𝑎2−𝑎1𝑎={𝑎}_{2}-{𝑎}_{1}. We have

{−𝑎𝑥}<1𝑛+1.\{-𝑎𝑥\}<\frac{1}{𝑛+1}.

If 𝑎𝑥∈Z𝑎𝑥\in \mathbb{Z}, we are already done. If 𝑎𝑥∉Z𝑎𝑥\notin \mathbb{Z}, then by Proposition 1.7 we have {−𝑎𝑥}=1−{𝑎𝑥}\{-𝑎𝑥\}=1-\{𝑎𝑥\}. Therefore

0≤1−{𝑎𝑥}<1𝑛+1.0\leq 1-\{𝑎𝑥\}<\frac{1}{𝑛+1}.

Hence

∣𝑎𝑥−(1+⌊𝑎𝑥⌋)∣=(1+⌊𝑎𝑥⌋)−𝑎𝑥<1𝑛+1.|𝑎𝑥-(1+\lfloor 𝑎𝑥\rfloor )|=(1+\lfloor 𝑎𝑥\rfloor )-𝑎𝑥<\frac{1}{𝑛+1}.

Take 𝑏=1+⌊𝑎𝑥⌋𝑏=1+\lfloor 𝑎𝑥\rfloor and we are done.

Proposition 1.8

Let 𝑥∈R∖Q𝑥\in \mathbb{R}∖\mathbb{Q}. There are infinitely many positive integers 𝑞𝑞 for which there exists 𝑝∈Z𝑝\in \mathbb{Z} such that

∣𝑥−𝑝𝑞∣<1𝑞2.\left|𝑥-\frac{𝑝}{𝑞}\right|<\frac{1}{{𝑞}^{2}}.
(1.5)
Proof

(1.5) is equivalent to

∣𝑞𝑥−𝑝∣<1𝑞.|𝑞𝑥-𝑝|<\frac{1}{𝑞}.
(1.6)

Before we go into the proof, a few observations.

𝑞=1𝑞=1 clearly satisfies. Let ε′=∣𝑥−⌊𝑥⌋∣{\varepsilon }^{\prime }=|𝑥-\lfloor 𝑥\rfloor | and ε′′=∣𝑥−(⌊𝑥⌋+1)∣{\varepsilon }^{\prime\prime }=|𝑥-(\lfloor 𝑥\rfloor +1)|, the two distances from 𝑥𝑥 to the integers adjacent to it.

Now suppose 𝑞𝑞 and 𝑝𝑝 satisfy (1.6) with 𝑞≥2𝑞\geq 2, and let ε=∣𝑞𝑥−𝑝∣\varepsilon =|𝑞𝑥-𝑝|. Then ε>0\varepsilon >0, since 𝑥𝑥 is irrational. Note also that 𝑞𝑥𝑞𝑥 can never be the midpoint of two consecutive integers, and that ε<1/2\varepsilon <1/2. For any other integer 𝑎≠𝑝𝑎\neq 𝑝, we must have

∣𝑞𝑥−𝑎∣>ε=∣𝑞𝑥−𝑝∣.|𝑞𝑥-𝑎|>\varepsilon =|𝑞𝑥-𝑝|.

That is, 𝑝𝑝 is the closest integer to 𝑞𝑥𝑞𝑥 when 𝑞≥2𝑞\geq 2.

We prove by contradiction. Assume there are only finitely many such positive integers, {1,𝑞1,…,𝑞𝑛}\{1,{𝑞}_{1},\ldots ,{𝑞}_{𝑛}\}. Let 𝑝𝑖{𝑝}_{𝑖} be the associated integer for which (1.6) holds, i.e.,

ε𝑖=∣𝑞𝑖𝑥−𝑝𝑖∣<1𝑞𝑖.{\varepsilon }_{𝑖}=|{𝑞}_{𝑖}𝑥-{𝑝}_{𝑖}|<\frac{1}{{𝑞}_{𝑖}}.

We aim to produce a contradiction by finding another qualified integer 𝑞𝑞. Let 𝑁∈Z+𝑁\in {\mathbb{Z}}^{+} be such that

𝑁>max⁡(1ε′,1ε′′,1ε1,…,1ε𝑛).𝑁>\max \left(\frac{1}{{\varepsilon }^{\prime }},\frac{1}{{\varepsilon }^{\prime\prime }},\frac{1}{{\varepsilon }_{1}},\ldots ,\frac{1}{{\varepsilon }_{𝑛}}\right).

By Theorem 1.2, there exist 𝑞∈{1,…,𝑁}𝑞\in \{1,\ldots ,𝑁\} and 𝑝∈Z𝑝\in \mathbb{Z} such that

ε=∣𝑞𝑥−𝑝∣<1𝑁+1<1𝑁≤1𝑞.\varepsilon =|𝑞𝑥-𝑝|<\frac{1}{𝑁+1}<\frac{1}{𝑁}\leq \frac{1}{𝑞}.

Note that

ε<1𝑁<ε𝑖∀𝑖∈{1,…,𝑛}.\varepsilon <\frac{1}{𝑁}<{\varepsilon }_{𝑖}\quad \forall 𝑖\in \{1,\ldots ,𝑛\}.

Also

∣𝑥−𝑝∣≥min⁡(ε′,ε′′)>ε.|𝑥-𝑝|\geq \min ({\varepsilon }^{\prime },{\varepsilon }^{\prime\prime })>\varepsilon .

If 𝑞=1𝑞=1, then ε=∣𝑥−𝑝∣\varepsilon =|𝑥-𝑝|, which is impossible. Thus 𝑞≠1𝑞\neq 1, so 𝑞≥2𝑞\geq 2. If 𝑞=𝑞𝑖𝑞={𝑞}_{𝑖} for some 𝑖𝑖, then 𝑝𝑝 is the closest integer to 𝑞𝑖𝑥{𝑞}_{𝑖}𝑥, hence 𝑝=𝑝𝑖𝑝={𝑝}_{𝑖} and ε=ε𝑖\varepsilon ={\varepsilon }_{𝑖}, contradicting ε<ε𝑖\varepsilon <{\varepsilon }_{𝑖}. Therefore 𝑞∉{1,𝑞1,…,𝑞𝑛}𝑞\notin \{1,{𝑞}_{1},\ldots ,{𝑞}_{𝑛}\}, and yet 𝑞𝑞 and 𝑝𝑝 satisfy (1.6). This is a contradiction, which concludes the proof.