← All projects / The Wobble

The wobble

On Do You Like Jazz? the row 1 4 7 3 6 2 5 1 went round a circle. Let it grow for ever instead and the places are 1 4 7 10 13 16. Read a number in them, read the answer, and keep going until it stops. How many numbers stop at each ending never settles down. It wobbles, as far as it has been followed, and the wobble has three causes that can each be picked out. Press play and watch it.

Reading a number, then reading the answer

Write the number in binary and give every bit a place: 1, 4, 7, 10, 13 and on, three more each time. Add up the places that hold a 1. Forwards, the first place sits on the last bit. Backwards, it sits on the leading bit. Then do the same to the answer, and again, until a number comes back.

Read

exact

The first reading is tiny beside the number

A number L bits long has a reading near three quarters of L × L. A 1,000-bit number reads as about 750,000, which is only 20 bits long. Its reading is a few hundred, and from there it is a short walk to the ending.

exact

So the ending is decided by the second reading

Everything after the first step happens among small numbers, and where each small number ends is a fixed list. The question "how many L-bit numbers end at 20" is really "where does the second reading land on that list".

Watch it play out

Every odd number of one length, and the share of them that reaches each ending. The length runs from 16 bits on the left to 8,192 on the right, doubling at each mark. Press play, or drag across the picture.

Read
Show

Where the second reading sits

The centre of the second reading at each length. Forwards it shivers, because the leading bits of the first reading carry the biggest places. Backwards it climbs smoothly. The faint upright lines mark the lengths where the average first reading passes a power of 2.

The bell underneath

Each bar is one value of the second reading. Its height is how many numbers land on it and its colour is where that value ends. The strip below is the fixed list of endings. As the length grows the list slides past under the bell, and the share of each colour in the bell is the share of each ending. The bell is worked out here, live, up to 1,024 bits.

Three causes

exact, then checked

The slow drift is an echo

Long numbers end the way much shorter ones do. An 8,192-bit number has a second reading near 538, which is the average first reading of numbers about 27 bits long. So the right-hand end of the picture is a blurred copy of what happens near 27 bits. From 256 bits up, the share that ends at 21 stays within 0.8 of 63 of the share at the short length it echoes, and within 0.2 on average. The small triangle under the picture marks that short length.

exact

The forwards shiver is the leading bits

Forwards, a number's leading bits carry its biggest places. Each time a leading bit of the average first reading flips, the second reading jumps by about 60 and the shares move with it. That is the shiver past 1,000 bits. In it, 20 and the loop trade places while 21 hardly moves.

counted

The backwards beat is the remainder on 3

Backwards, "ends at 1" peaks at 27, 39, 57, 82, 118, 166 and 236 bits, each about 1.41 times the last: one beat every time the average first reading doubles. Every place leaves 1 when divided by 3, so a reading's remainder on 3 is its count of 1s. Backwards the bell comes out jagged by that remainder, and where a number ends depends on it. Smear the remainder out and the swing between 32 and 300 bits falls from 7.4 of 63 to 2.1. Switch on "remainder smeared" above to see the beat go flat.

counted

The beat fades, the drift doesn't

As the numbers get longer the bell smooths out and the remainder stops mattering. The backwards swing in "ends at 1" is 7.4 of 63 below 300 bits, 4.8 from 300 to 700, and under 3 from 1,024 to 8,192. What is left is the slow echo.

Both ways round

ForwardsBackwards
The first place sits onthe last bitthe leading bit
Numbers end at20, 21, loop 23 25 241, 21, loop 11 18, 47
The biggest ending, 64 to 8,192 bits20: from 25.9 to 32.2 of 63 (41.2% to 51.1%)1: from 30.5 to 37.9 of 63 (48.4% to 60.2%)
Ends at 21, 64 to 8,192 bits16.6 to 22.3 of 63 (26.3% to 35.4%)3.0 to 6.7 of 63 (4.8% to 10.7%)
What it looks likea slow drift, then a shiver past 1,000 bitsa big clean beat to about 500 bits, then calm
Mostly caused bywhere the second reading sitsits remainder on 3

exact

21 is the only ending they share

21 is 10101, the same from either end, and it reads as 1 + 7 + 13 both ways. Forwards, 20 is 10100 and reads as 7 + 13. Backwards, 47 is 101111 and reads as 1 + 7 + 10 + 13 + 16. Below a million, forwards only 1, 20 and 21 read as themselves.

exact

The first reading is spread the same either way

The same places are handed out, only in the other order. So among all the numbers of one length, the first readings come out the same forwards and backwards. The two ways part company at the second reading, and that is the whole difference between the two pictures.

exact

Forwards plus backwards is flat

Add the two readings of any number and you get (3 × its bits − 1) × its count of 1s. On the jazz page the closed row folded to a 1null1, alive in the middle and dead at the ends. A row that grows for ever has no far end, so there is nothing to stay dead and the fold only counts the 1s.

Is it settling on a third?

counted

For a long stretch it looks like it

Forwards, the share that ends at 21 stays between 20.5 and 22.3 of 63 all the way from 1,024 to 8,192 bits, and one third is exactly 21 of 63. It crosses a third near 1,024 bits and is still creeping up at 8,192.

a reading, not proved

But that stretch is an echo too

Those lengths echo numbers about 20 to 27 bits long, where the share that ends at 21 is also about 21 of 63. At 128 bits it was 16.6 of 63 (26.4%). If the echo keeps working, the share leaves a third again, but only for numbers far too long to work out.

not known

Nobody has shown it never settles

The shares were followed exactly to 8,192 bits and nothing there points to a limit. The echo is a reason to expect the wobble to go on, replayed more and more slowly. It is not a proof. Why the backwards beat falls once per doubling is also a reading of the peaks, not something tested on its own.

counted

A row that fits gives the same endings

Size a closed jazz row to the numbers and, from 15 bits up, it sends them to the same three places: 20, 21 and the loop 23, 25, 24. Reading again only ever uses the low places, and for any big circle those are 1 4 7 10 13. The pictures are on Kaleidoscopes: type 1 4 7 3 6 2 5 into "your own places".