Successive records in mathematical sequences: surprising result

For the case of $\frac{\sqrt{2}}{2}$, we look to find $k\in\mathbb{N}$ such that $\frac{\sqrt{2}}{2}k\pmod 1$ is as large as possible.

First, consider the sequence of "best possible" rational over-estimates of $\frac{\sqrt{2}}{2}$. We can do this using finite iterations of the continued fraction $[0;1,\bar 2]$ evaluated with the last term as $0$, giving the sequence: $$S_n=\frac{1}{1},\frac{3}{4},\frac{5}{7},\frac{17}{24},\frac{29}{41}...\space\space\space\space$$

The (strictly increasing) sequence of denominators is then:

$$D_n=1,4,7,24,41...$$

Since we know $\frac{\sqrt{2}}{2}<S_n$ for all $n$, we have that: $$\frac{\sqrt{2}}{2}D_n<S_nD_n=k,\space k\in\mathbb{N}$$

This implies:

$$\left(\frac{\sqrt{2}}{2}-S_n\right)D_n\equiv\frac{\sqrt{2}}{2}D_n\pmod 1\tag{1}$$

Since $S_n$ is a "best possible" approximation for $\frac{\sqrt{2}}{2}$, we have that:

$$\left|\frac{\sqrt{2}}{2}-\frac{a}{b}\right|<\left|\frac{\sqrt{2}}{2}-S_n\right|\implies b>D_n$$

Hence:

$$\left|\frac{\sqrt{2}}{2}-S_n\right|D_n=\left(S_n-\frac{\sqrt{2}}{2}\right)D_n$$

Is minimal. Multiplying both sides of $(1)$ by $-1$, we find that:

$$\left(S_n-\frac{\sqrt{2}}{2}\right)D_n\equiv -\frac{\sqrt{2}}{2}D_n\equiv 1-\frac{\sqrt{2}}{2}D_n \pmod 1$$

Must also be minimal. Therefore:

$$\frac{\sqrt{2}}{2}k\pmod 1$$

Is maximal for some $k\in\mathbb{N}\iff k=D_n$

Note:

On further inspection, I realised that (provided my proof is correct), substituting any irrational number $\alpha$ (perhaps rational too?) for $\frac{\sqrt{2}}{2}$ would lead to the same result:

$\alpha D_n\pmod 1>\alpha k\pmod 1$ for all $k\in\mathbb{N}, k<D_n \iff D_n$ represents the sequence of over-estimate convergent denominators from the continued fraction of $\alpha$.


So here is how it works. No proof here, but I am showing the pattern for all irrational numbers.

enter image description here

The above table is for the number $e$ but it works the same way for all irrational numbers. Follow the red path! The convergents of $e$ are listed below (source: here). Look at the denominator of each convergent to identify the pattern:

8/3,

11/4,

19/7,

87/32,

106/39,

193/71,

1264/465,

1457/536,

2721/1001,

23225/8544,

25946/9545,

49171/18089,

517656/190435,

566827/208524,

1084483/398959,

13580623/4996032,

14665106/5394991,

28245729/10391023,

410105312/150869313,

438351041/161260336,

848456353/312129649,...