# Continued fractions question (visual)

In the figure below, the rectangle has dimensions a x b and is tiled by squares. This is the smallest possible rectangle that can be tiled by squares in this manner.

a) write the continued fraction for $$a/b$$

b) find the value of $$a+b$$

Can someone please explain how i'd break this up? For part a, I am thinking that $$b=6x$$

$$x=4y$$

So $$b=24y$$

Is this correct? I've never seen a question like this before.

For a rectangle with side lengths $$a$$ and $$b$$, with $$a\gt b$$, a square dissection of this form can be converted to a simple continued fraction for $$a/b$$ by counting the number of squares at each stage, in decreasing size, and using those values in the continued fraction.

(Note: a simple continued fraction is one where the numerators are all $$1$$.)

We have:
$$\color{red}1\;$$ white square
$$\color{red}5\;$$ light grey squares
$$\color{red}1\;$$ black square
$$\color{red}4\;$$ dark grey squares

Which leads to the following continued fraction: $$\frac{a}{b} = \color{red}1 + \cfrac{1}{\color{red}5 + \cfrac{1}{\color{red}1 + \cfrac{1}{\color{red}4}}}$$

To calculate $$a$$ and $$b$$ in this instance it's easy enough to evaluate the continued fraction:

$$\frac{a}{b} = 1 + \cfrac{1}{5 + \cfrac{1}{1 + \cfrac{1}{4}}} = 1 + \cfrac{1}{5 + \cfrac{1}{\frac{5}{4}}} = 1 + \cfrac{1}{5 + \cfrac{4}{5}} = 1 + \cfrac{1}{\frac{29}{5}} = 1 + \frac{5}{29} = \frac{34}{29}$$

So we have $$a/b = 34/29$$, and hence $$a+b=63$$.