Sqrt(2) Post

Introduction

While exploring aperiodicity I derived two elegant series representations for the square root of 2. These representations are not original but they are perhaps underappreciated because: (1) as of 2025-01-23 neither appears on the Wikipedia page for the square root of 2, and (2) David Flannery’s 2006 book “The Square Root of 2” does not provide them despite dealing extensively with the convergents of the continued fraction representation of the square root of 2 (for this post, just “the convergents”). The goal of this post is to increase awareness of these two square root of 2 series representations, which I call difference of alternating convergents (DOAC) from the way they are derived. One square root of 2 DOAC series approaches the square root of 2 from below; the other from above.

DOAC Series Representations

The ‘converge from below’ and ‘converge from above’ square root of 2 DOAC series representations are provided in Figure 1.

For each series, there are two ways to generate the denominators: (1) using a 3rd-order recurrence relation; or (2) using a 2nd-order recurrence relation (with a constant). Comparing denominator generation for the two series representations, the 3rd-order recurrence relation differs only in the initial values, whereas for the 2nd-order recurrence relation the constant term also differs (-24 for the ‘from below’ series; +24 for ‘from above’).

Derivation

To derive these series representations:
(1) divide the sequence of convergents into two sub-sequences. The first sub-sequence consists of convergents less than the square root of 2 (the under sub-sequence); the other greater than the square root of 2 (the over-subsequence).
(2a) form the DOAC ‘from below’ by creating a series from the difference of the terms in the under-subsequence
(2b) form the DOAC ‘from above’ by creating a series from the difference of the terms in the over-subsequence

This derivation is summarized in Figure 2.

Numerical Verification

I wrote C language code to numerically verify the two DOAC series representations for the square root of 2. The user enters the number of terms in the series to generate (called an iteration in the listing); the software then calculates the resulting approximation to the square root of 2 and the square of this value. For the DOAC series representation from below, the approximation squared should be just under 2, as shown in Figure 3. For DOAC from above, the approximation squared should be just above 2, as shown in Figure 4. Each listing shows denominators calculated using both the 3rd-order and 2nd-order recurrence relation to verify that both methods are correct.

The C source code used for square root of 2 DOAC series representation verification is provided in Figure 5 and Figure 6 for the 3rd-order recurrence relation and 2nd-order recurrence relation, respectively. There is additional commentary in the code.

Development History

(1) Derived the ‘from below’ series representation for use in aperiodicity exploration.
(2) Derived the third-order recurrence relation governing the denominators of the ‘from below’ series representation.
(3) Wondered whether the ‘from below’ sequence of denominators was in the Online Encyclopedia of Integer Sequences (OEIS). The answer was YES (A076218), as shown in Figure 7.
(4) Noted that the ‘from below’ DOAC series representation was provided in the OEIS A076218 entry. So, my work on this series wasn’t original. As an amateur / hobbyist, this was of no concern.
(5) Wondered whether the ‘from above’ sequence of denominators was in OEIS. The answer was YES (A078522), as shown in Figure 8.
(6) Noted that the ‘from above’ OEIS entry includes a second-order recurrence relation for the denominators. The possibility of a second-order recurrence relation governing the denominators wasn’t on my radar screen.
(7) Derived the second-order recurrence relation for the ‘from below’ series representation. Found that the ‘from below’ and ‘from above’ second-order recurrence relations differ only in the constant term.

What’s Next?

Submit upgrade requests as follows:
(1) The OEIS entry A076218 (denominators of the DOAC ‘from below’ series representation) is missing the second-order recurrence relation.
(2) The OEIS entry A078522 (denominators of the DOAC ‘from above’ series representation) is missing an explicit version of the DOAC series representation. The current entry provides this only implicitly.
(3) The 2025-01-23 Wikipedia page for the square root of 2 (excerpt shown in Figure 9) is missing both the ‘from below’ and ‘from above’ DOAC series representations. The last series in Figure 9 is similar to the ‘from above’ DOAC representation but may not be a correct series representation for the square root of 2.