← All projects / Overlays

Overlays: seams and streaks

Lay one family's picture over another. Keep where both are lit, or either, or take one away from the other, and slide either one sideways first. The primes can be shown on top in orange. The 369 pictures have the primes' grain but come out too wide and full of seams. This page is for finding out why, and what the primes' own picture is an overlay of.

The map

Try
Layer A
Layer B
Green is
Primes
Row width
Columns
Zoom

primegreen, not primeneither

Shares are given out of 63, with per cent beside them. 63 is 111111 in binary, it reads as itself in the 369, and it splits evenly into thirds, sevenths and ninths, so an even share by 3, 7 or 9 is a whole number: 21, 9 or 7.

Drag to move around. Double click, or double tap, to zoom in on a spot. Move over the map to read off a number. Sliding a layer by 1 means each square shows the layer's answer for the next odd number along.

Why the 369 has seams and the primes don't

exact

Seams come from places that keep growing

A 369 reading uses places worth 3, 6, 9, 12 and on upward, and with the 1 at the end it also depends on how long the number is. Each time the numbers get one bit longer the picture changes, and that is a seam. Between seams every row is the same picture pushed along, which is what makes the bands wide.

exact

Streaks come from places that repeat

Read binary with places worth 1, 2, 1, 2 and so on, the 1010 pattern. The reading divides by 3 exactly when the number does. Places 1, 2, 4, 3 do the same for 5, and 1, 2, 4 for 7. Because the places repeat, nothing changes when the number gets longer. The pattern runs across the whole map one square thick, with no seam.

exact

The primes are the overlay of all of them

Strike out the multiples of 3, then 5, then 7, and keep going. What is left is the primes. So the primes' picture is every repeating family laid over every other and taken away. That is the sieve of Eratosthenes, over two thousand years old. The table below shows how fast it closes in.

Counted for the first 262,144 odd numbers. On the map, choose "the sieve" for layer A to watch it happen.

Sorting the columns for the primes

exact

Some row widths kill whole columns

With 105 odd numbers to a row, going down one row adds 210, which is 2 × 3 × 5 × 7. So every number in a column leaves the same when divided by 3, by 5 and by 7. If the top one divides by any of them, the whole column does, and no prime can sit in it below the first row. Only 48 of the 105 columns are live.

exact

That is the primes' own "sort the columns"

Set the row width to 105 or 255 and press "live columns first". All the orange moves to one side. At 255 the live columns are 128 of 255, because 255 is 3 × 5 × 17. At 64, 128, 256 and 512 every column is live and there is nothing to sort, which is why the primes showed slanted streaks there instead.

Why it stops there

A 369 ending can be straightened fully because a reading is a column part plus a row part. Whether a number is prime doesn't split that way. Sorting can gather the columns the small primes have ruled out, and nothing more. Inside the live columns the orange has no order that sorting can find.

Sliding and subtracting: does anything fit?

3 6 9 13 has a grain much like the primes' and is too wide. Taking a slid copy away thins it. Whether the thinner picture sits on the primes is a separate question, and it can be counted. The score below is the gap divided by its luck.

measured

Sliding one layer

measured

Taking a slid layer away

measured

With the small primes removed

What that adds up to

Sliding and subtracting do move the primes in and out of the green by about 1 in 63, and that is not luck. It comes from the multiples of 3 and 7: a slide changes which of them the green sits on. It mostly reverses when the numbers get one bit longer, because the 369 picture changes at every seam and the multiples of 3 and 7 don't.