Science Next to Art or A Theorem Deferred
I was writing some code last week to compute the period of the continued fraction expansion of the square root of the natural numbers. When I needed a condition to know when the repetition started to end my recursion. There’s a natural point when double the leading term appears that pops up in the tables.
- √2 = [1; 2]
- √7 = [2; 1, 1, 1, 4]
- √97 = [9; 1, 5, 1, 1, 1, 1, 1, 1, 5, 1, 18]
But I wasn’t entirely convinced, so I sketched a quick proof to make myself believe before I ended up coding it into my recursion.
So in keeping with my ideals to keep everything in direct contact with each other. Like my notes from classes at Rice. Math rubbing shoulders with Literature. Science next to art. I intended on posting it up here.
However, in fleshing out the details of my proof, it ended up being much more complicated than the simple induction that was enough to convince me to use it. I ended up falling back onto the shoulders of giants and read the section on it in Waclaw Sierpinski’s Elementary Theory of Numbers.
Ultimately, it’s all for naught anyway, since a simple recursion on the error term is a terrible way to tackle the problem because of the lack of floating-point precision. The exact problem continued fractions are trying to solve in the first place.
However, the real lesson is that I should have just posted the sketch. The desire for perfection is useless.