Wednesday, October 26, 2016

Golden ratio, Fibonacci numbers, and sums of squares

Today in my Foundations of Arithmetic class we talked a bit about the Golden Ratio. This is a nice number that appears in many places in mathematics, art, and nature!

The defining property of the Golden Ratio is a self-replicating quality of rectangles: We say that a rectangle has a Golden Ratio, or that its dimensions are in a Golden Ratio if after taking away the biggest square possible, the remaining rectangle is proportional to the original one. 

This means that a rectangle like above will satisfy this condition if

Having this property means in particular that it is possible to carry out this trick forever, that is, since the leftover rectangle is similar to the original one, it is possible to take another square out and have a smaller leftover rectangle which is similar to the original one. Then, the process can be applied once more, and once again, indefinitely.

This recursion does not hold for other ratios. For example, if the ratio between the dimensions is rational, this process actually ends. 

For example, for a rectangle with dimensions $11\times 19$ we have that the process ends after 7 iterations

That is, after 7 times we had no leftover rectangle! The light blue $1\times 1$ leftover was a square already, so it is not possible to repeat the process. This happens because $\frac{19}{11}$ is a rational number. In the case of the golden ratio, it is an irrational number, 


so we can never finish the process, as there will always be a leftover rectangle. A nice pattern arises when performing this procedure which is surprisingly related to continued fractions. For the ratio $11\times19$ we have that its simple continued fraction expansion is




Notice that there is 1 $11\times 11$ square, 1 $8\times 8$ square, 2 $3\times 3$ squares, 1 $2\times 2$ square, and 2 $1\times 1$ square, the same as the continued fraction coefficients!

Looking at this more geometrically, the continuous fraction expansion tells a way to write down the area of the rectangle as a sum of squares, that is, 

$$11\times 19=209=11^2+8^2+3^2+3^2+2^2+1^2+1^2\,.$$

This is also true if the dimensions of the rectangle are commensurable, were the coefficients of the continued fraction indicates the number of times a certain square is repeated. If we have a rectangle with dimensions $p\times q$ with $p/q$ is rational. Then these squares will have dimensions that are of the type $d=np-mq$ with $n,m$ natural numbers. 

In the case of a rectangle with dimensions $\phi\times 1$ this process gives


which, not surprisingly enough, can be written using Fibonacci numbers

$$\phi=\sum_{n=0}^\infty \left(F_n \phi-F_{n+1}\right)^2\,.$$

In general, for any real $x>1$ we can do this trick. Let the continued fraction of $x$ be given by


then we have that considering a rectangle with dimensions $1\times x$ gives a square decomposition

$$x=\sum_{n=0}^\infty a_0(b_n x-c_n)^2\,,$$

which is finite if and only if $x$ is rational. An interesting problem would be to study the properties of the sequences $\{b_n\}$ and $\{c_n\}$, but I'll leave that for another time.