Let be a positive integer. Describe, in terms of the prime factorisation of , the largest integer which is the side length of a square tile which can be used to completely tile a rectangle that is inscribed in a circle of radius , if such a tiling is possible.
Solution
This problem is the general version of Problem 16 and the first part of the solution is the same. Let be the side length of the square tile. If the rectangle is completely tiled with such square tiles, there exist integers such that the side lengths of the rectangle are and . The diagonals of the rectangle are diameters of the circle and so their length is . Applying Pythagoras to the right angled triangle obtained by cutting the rectangle along one of its diagonals, we obtain
As are integers, this implies that is a factor of and so is an integer that satisfies . Because we are to find the largest possible , we are interested in the smallest that divides and which appears as the hypotenuse of a right angled triangle with integer side lengths.
If we have a divisor of and a Pythagorean Triple with , then is an integer which can be used as the length of a tile with which we can tile an inscribed rectangle of side lengths and .
If the Pythagorean Triple is not primitive, there exists an integer and a primitive Pythagorean Triple such that . Because divides , divides as well. Since , to find the smallest possible it is sufficient to consider primitive Pythagorean Triples.
It is well known that, up to interchanging and , all primitive Pythagorean Triples can be obtained as follows from integers that are coprime and for which is even:
Therefore, we are interested in finding the smallest positive divisor of which can be written as the sum of two distinct and coprime squares of positive integers. Even though it is well known which integers can be written as a sum of two squares, we do not suppose the reader to be familiar with this theory.
If is divisible by a prime which is congruent to 3 modulo 4, then both, and , must be divisible by , because otherwise there would exist an integer for which , which is impossible by Fermat's Little Theorem. Therefore, the desired smallest cannot be divisible by such a prime number.
It is also well known that an odd prime number can be written as the sum of two squares if and only if it is congruent to 1 modulo 4. If a divisor of is divisible by such a prime , then and can only be the smallest possible choice if .
If is not divisible by any odd prime then . The only way to write as the sum of two squares is when is even, and when is odd. To see this, divide the equation across by the highest possible power of 2 which leads either to or to , because at least one of the three numbers must be odd. Hence, such numbers are not of the required form with .
Hence, the desired smallest that divides and which appears as the hypotenuse of a right angled triangle with integer side lengths is the smallest prime factor of which is congruent to 1 modulo 4. If no such prime factor exists, the desired tiling is not possible. If such exists, then is the maximal side length of a tile.
If with , then are automatically coprime and is even. We then obtain and and so the side lengths of the inscribed rectangle are equal to