Number of oblong rectangles up to similarity having integer side lengths in [1, r]

34 Views Asked by At

How many oblong rectangles are there up to similarity which have integer side lengths between (and including) $1$ and $r$ for $r\in\Bbb Z^+$?

This is a problem I set for myself for fun a few hours ago, but I still don't know where to begin. Any hint would be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

Suppose the dimensions of a rectangle are $a×b$; without loss of generality we can assume $a\ge b$ since swapping dimensions yields a similar rectangle.

Now fix $a$ and vary $b$; the rectangle is dissimilar from all smaller rectangles if and only if $\gcd(a,b)=1$. The number of values $b$ that cause this condition to be satisfied for some $a$ is the definition of the Euler totient function $\varphi(a)$; for example, $\varphi(6)=2$ since only the $6×1$ and $6×5$ rectangles are dissimilar from all smaller rectangles.

The number of rectangles up to similarity that have integer side lengths in $[1,r]$ is then the sum of totients: $$S(r)=\sum_{k=1}^r\varphi(k)$$ and this function is A002088 in the OEIS. The first few values of $S(r)$ starting from $r=1$ are below. $$1, 2, 4, 6, 10, 12, 18, 22, 28, 32, 42, 46,\dots$$ Note that this also counts the $1×1$ square at the very beginning; if you want rectangles in the strict sense just subtract 1 from the values listed above. $$0, 1, 3, 5, 9, 11, 17, 21, 27, 31, 41, 45,\dots$$ This is also in the OEIS, as A015614.