Square $S_{1}$ is $1\times 1.$  For $i\ge 1,$ the lengths of the sides of square $S_{i+1}$ are half the lengths of the sides of square $S_{i},$ two adjacent sides of square $S_{i}$ are perpendicular bisectors of two adjacent sides of square $S_{i+1},$ and the other two sides of square $S_{i+1},$ are the perpendicular bisectors of two adjacent sides of square $S_{i+2}.$  The total area enclosed by at least one of $S_{1}, S_{2}, S_{3}, S_{4}, S_{5}$ can be written in the form $m/n,$ where $m$ and $n$ are relatively prime positive integers.  Find $m-n.$
[AIME 1995 Problem 1.png](https://artofproblemsolving.com/wiki/index.php/File:AIME_1995_Problem_1.png)
The sum of the areas of the [squares](https://artofproblemsolving.com/wiki/index.php/Square) if they were not interconnected is a [geometric sequence](https://artofproblemsolving.com/wiki/index.php/Geometric_sequence): 

$1^2 + \left(\frac{1}{2}\right)^2 + \left(\frac{1}{4}\right)^2 + \left(\frac{1}{8}\right)^2 + \left(\frac{1}{16}\right)^2$
Then subtract the areas of the intersections, which is $\left(\frac{1}{4}\right)^2 + \ldots + \left(\frac{1}{32}\right)^2$:

$1^2 + \left(\frac{1}{2}\right)^2 + \left(\frac{1}{4}\right)^2 + \left(\frac{1}{8}\right)^2 + \left(\frac{1}{16}\right)^2 - \left[\left(\frac{1}{4}\right)^2 + \left(\frac{1}{8}\right)^2 + \left(\frac{1}{16}\right)^2 + \left(\frac{1}{32}\right)^2\right]$
$= 1 + \frac{1}{2}^2 - \frac{1}{32}^2$
The majority of the terms cancel, leaving $1 + \frac{1}{4} - \frac{1}{1024}$, which simplifies down to $\frac{1024 + \left(256 - 1\right)}{1024}$. Thus, $m-n =  \boxed{255}$.
Alternatively, take the area of the first square and add $\,\frac{3}{4}$ of the areas of  the remaining squares. This results in $1+ \frac{3}{4}\left[\left(\frac{1}{2}\right)^2 + \ldots + \left(\frac{1}{16}^2\right)\right]$, which when simplified will produce the same answer.