How Many Rectangles Can You Make?

Illustration by Guillaume Kurkdjian
Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. Two puzzles are presented each week: the Riddler Express for those of you who want something bite-size and the Riddler Classic for those of you in the slow-puzzle movement. Submit a correct answer for either,1 and you may get a shoutout in the next column. Please wait until Monday to publicly share your answers! If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter or send me an email.
Riddler Express
You have four squares that you can place on a large, flat table. You can place the squares so that their edges align, but their interiors cannot overlap.
Your goal is to position the squares so that you can trace as many rectangles as possible using the edges of the squares. For example, if you had two squares instead of four, you could place the squares side by side, as shown below:

With this arrangement, it’s possible to trace three rectangles: the square on the left, the square on the right and the larger rectangle around both squares. How would you arrange four squares to get as many rectangles as possible? And what is this number of rectangles?
Riddler Classic
From Nicola Paciolla comes a game that you can win (or more likely lose?) all by yourself:
There’s a version of solitaire played in southern Italy with a deck of 40 Neapolitan cards, with four suits numbered from 1 to 10. The deck is shuffled and then cards are turned over one at a time. Flipping over the first card you say “one,” the second card “two” and the third card “three.” You repeat this, saying “one” for the fourth card, “two” for the fifth card and “three” for the sixth card. You continue your way through the deck, until you at last say “one” for the 40th card.
If at any point the number you say matches the value of the card you flip over, you lose.
What is your probability of winning the game?
Solution to the last Riddler Express
Congratulations to 👏 Kiera Jones 👏 of Cincinnati, Ohio, winner of last week’s Riddler Express.
Last week, you had to find all pairs of integers a and b that are solutions to the following equation: a·(a+1)·(a+2) = b2+4.
That was the entire riddle. It was short and sweet.
While it might have been tempting to go down a rabbit hole of algebra, expanding the cubic expression on the left and equating it to the quadratic on the right was no picnic. There was a simpler way, using ideas from number theory.
There were a few things you could immediately tell about the expression on the left, a·(a+1)·(a+2). For one, it had to be an even number. If a was even, then the product was also even, since an integer with an even factor must also be even. And if a was odd, then a+1 was even, again ensuring that the overall product was even.
You similarly knew that a·(a+1)·(a+2) was divisible by 3. That was because exactly one of the three factors had to be a multiple of 3. In number theory parlance, either a was a multiple of 3, a was congruent to 1 (mod 3),2 in which case a+2 was a multiple of 3, or a was congruent to 2 (mod 3), in which case a+1 was a multiple of 3.
Finally, since a·(a+1)·(a+2) was a multiple of both 2 and 3, that meant it was also a multiple of 6. In terms of factors, that was everything you could say for sure about the left side of the equation.
Now what about the right side? At first, it wasn’t immediately clear how b2+4 might have related to factors of 2, 3 or 6. But let’s take a look. If b was odd, then b2 was also odd, as was b2+4. Conversely, if b was even, then so were b2 and b2+4. Since a·(a+1)·(a+2) was guaranteed to be even, that meant any solution had to have an even value for b.
If b was a multiple of 3, then so was b2, which meant b2+4 was congruent to 1 (mod 3). If b was congruent to 1 (mod 3), then so was b2, which meant b2+4 was congruent to 2 (mod 3). Finally, if b was congruent to 2 (mod 3), then b2 was again congruent to 1 (mod 3), which meant b2+4 was congruent to 2 (mod 3). In other words, b2+4 was never congruent to 0 (mod 3). If you’re not convinced, check the values of b2+4 for different integer values of b. Sure enough, it’s never a multiple of 3!
At this point, you knew the left side of the equation had to be a multiple of 3. Meanwhile, the right side of the equation couldn’t be a multiple of 3. Therefore, this equation had no integer solutions. Sometimes the answer … is that there is no answer.
Solution to the last Riddler Classic
Congratulations to 👏 Michael Seifert 👏 of Quaker Hill, Connecticut, winner of last week’s Riddler Classic.
Last week, on a cloudless night, the sky above you contained an equal number of visible stars and planes. Suddenly, you spotted a point of light at a particular angle of elevation above the horizon. Based purely on this angle, you wanted to determine whether the point of light was more likely to be a star or a plane.
While figuring this out, you made the following simplifying assumptions:
- Earth was a perfect sphere with a radius of 4,000 miles.
- Stars were equally likely to be anywhere in the night sky.
- Planes were equally likely to be flying anywhere over Earth (i.e., not just limited to established air routes) at an altitude of 6 miles. You could neglect takeoffs and landings.
After some quick thinking, you realized that at this particular angle, the point of light was equally likely to be a star or a plane. What was this angle of elevation?
This was a hard one!
Before getting into the math, let’s first try to understand what’s going on at a more qualitative level and convince ourselves that there is a solution. To do that, it’s helpful to reduce the problem from three dimensions to two. That is, suppose Earth is a circle (rather than a sphere) with a radius of 4,000 miles. Planes fly around a concentric circle with a radius of 4,006 miles. And the stars lie on a third concentric circle with a radius that is effectively infinite.
In this two-dimensional scenario, where in the sky were you more likely to see stars? Where were you more likely to see planes? As an illustration, the diagram below (not to scale) shows where planes appear at an angle of elevation above or below 45 degrees. While stars had an equal chance of being above or below this angle (again, in two dimensions), the same wasn’t true for planes. Of the portion of the 4,006-mile radius circle that was visible from the surface of the 4,000-mile radius circle, much of it was closer to the horizon. In fact, only about 3 percent of planes had an angle of elevation greater than 45 degrees, with the remaining 97 percent at lower angles.

The same phenomenon occurred in three dimensions. Once again, planes were more likely than stars to be closer to the horizon, while stars were more likely than planes to occur at higher angles. Solver Josh Silverman generated the following graph, which showed the probability distributions by angle of elevation for both stars (dashed black line) and planes (solid yellow line). Note that these distributions didn’t account for the fact that there was more spherical space at lower angles — but for comparative purposes, this omission didn’t matter.

Since the puzzle stated that there were an equal number of visible stars and planes in the sky, the intersection in the graph was precisely the angle at which the point was equally likely to be a star or a plane. Reading off the graph, this angle of elevation was approximately 0.1 radians, or about 6 degrees.
For those of you who went through the detailed calculus to determine these distributions as well as their intersection, I salute you! But I won’t be working through that derivation here. Instead, I would like to point readers to some excellent write-ups by Riddler Nation, including those of Josh, Peter Ji and Starvind. For the analytically inclined, the more precise answer turned out to be about 6.065 degrees.
Of course, there are other, more practical ways to distinguish stars and planes in the night sky. Planes visibly move and also have blinking lights. Orbiting satellites are interesting in that they also visibly move but generally don’t blink, as they are visible via reflected sunlight.
In any case, the next time you’re skygazing, keep an eye out for planes, stars and satellites. Unless you live right under a major air route, I bet you’ll see planes closer to the horizon, satellites further away from the horizon, and stars the most evenly distributed throughout the sky. Why? Because math!
Want more puzzles?
Well, aren’t you lucky? There’s a whole book full of the best puzzles from this column and some never-before-seen head-scratchers. It’s called “The Riddler,” and it’s in stores now!
Want to submit a riddle?
Email Zach Wissner-Gross at riddlercolumn@gmail.com.