Back

100, 10, 1

Open
Created: November 8, 2025

Your friend, Cole, shows you his first attempt at programming: a calculator that takes in a binary sequence and does an arbitrary computation on it:

  • If the binary sequence ends with a 0, delete it.
  • Otherwise, add a 0 to the end, add the original sequence to it, then add 1 to it.

You test it with a random sequence of 0s and 1s: 11010 and press “Calculate”.

As expected by the first rule, it takes off the 0 at the end to give 1101.

Lazy to enter another binary sequence, you press “Calculate” again with 1101 now being the input. As expected by the second rule, it adds a 0 at the back (giving 11010), adds 1101 to the sequence (giving 100111), and finally adding 1 to it to give you 101000.

It looks like it works, so you press “Calculate” repeatedly. The digits flash by:

10100
1010
101
10000
1000
100
10
1
100
10
1
100
10
1
100
10
1

It looks like it’s just repeating the sequences 100, 10, and 1 in a loop.

“Huh, I’ve never tested my program like this before,” Cole says. “What do you think if we started with a different binary sequence?”

This time, you start with the binary sequence 11110001.

11110001
1011010100
101101010
10110101
1000100000
100010000
10001000
1000100
100010
10001
110100
11010
1101
101000
10100
1010
101
10000
1000
100
10
1
100
10
1
100
10
1
100
10
1

The process takes longer this time, but sure enough, it eventually ends up at the pattern 100, 10, 1 too.

“Hmm, is it a coincidence?” Cole asks.

“I’m not sure,” you reply. “But we can test it out.”

You spend the afternoon trying out different numbers, eventually ending up with the 100, 10, 1 sequences each time.

“I think that no matter what binary sequence you start with, you always add up at 100, 10, 1,” Cole declares.

What do you think?

Hint

At the time of writing this puzzle, nobody knows the solution to this.

Hint

The binary sequence is a red herring. Try converting the computation to decimal numbers.

Hint

Consider these 2 questions:

  • What’s a special property of numbers whose binary representation ends with a 0? How about 1?
  • What happens to a number if we add 0 to the end of its binary representation? How about if we removed a 0 from the end?
Obvious Hint

Look up the Collatz Conjecture.

Solution

Before we dive into the “solution” (or lack thereof), let’s take a look at the binary representation of a number. Imagine we have a number nnn with a binary representation of:

n=...b4b3b2b1b0n = ... b_4 b_3 b_2 b_1 b_0n=...b4b3b2b1b0

This gives rise to a value of:

n=...+(24b4)+(23b3)+(22b2)+(21b1)+(20b0)n = ... + (2^4 b_4) + (2^3 b_3) + (2^2 b_2) + (2^1 b_1) + (2^0 b_0)n=...+(24b4)+(23b3)+(22b2)+(21b1)+(20b0)

Notice how that apart from the b0b_0b0 term, everything else is a multiple of 2? This means that n is even if and only if b0b_0b0 is 0, and odd if and only if b1b_1b1 is 1. Let’s call this Lemma 1.

Let’s define a number nn'n such that its binary representation is given as:

n=...b4b3b2b1b00n' = ... b_4 b_3 b_2 b_1 b_0 0n=...b4b3b2b1b00

Where bkb_kbk are the digits from our original nnn. Then nn'n would be:

n=...+(25b4)+(24b3)+(23b2)+(22b1)+(21b0)+(0)=2×(...+(24b4)+(23b3)+(22b2)+(21b1)+(20b0))=2n\begin{align*} n' &= ... + (2^5 b_4) + (2^4 b_3) + (2^3 b_2) + (2^2 b_1) + (2^1 b_0) + (0) \\ &= 2 \times (... + (2^4 b_4) + (2^3 b_3) + (2^2 b_2) + (2^1 b_1) + (2^0 b_0)) \\ &= 2n \end{align*}n=...+(25b4)+(24b3)+(23b2)+(22b1)+(21b0)+(0)=2×(...+(24b4)+(23b3)+(22b2)+(21b1)+(20b0))=2n

In short, adding 0 to end of a binary representation of a number will double it. Let’s call this Lemma 2.

By the same logic, if a number’s binary sequence ends with a 0 (meaning it is an even number), then removing the 0 from the end will divide the number by 2. Let’s call this Lemma 3.

Let’s take a look at the rules of Cole’s program again:

  • If the binary sequence ends with a 0, delete it.
  • Otherwise, add a 0 to the end, add the original sequence to it, then add 1 to it.

Taking what we have just learnt, we know that the machine takes in a number nnn, then outputs:

  • n2\frac{n}{2}2n if nnn is even (by Lemma 1 and Lemma 3).
  • 2n+n+12n + n + 12n+n+1 if nnn is odd (by Lemma 1 and Lemma 2).

Simplifying the second rule, we get:

  • If a number is even, divide it by 2.
  • If a number is odd, multiply it by 3, then add 1.

We’ve arrived at the Collatz Conjecture.

Consider the function f:

f(n)={n2if n is even3n+1if n is oddf(n) = \begin{cases} \frac{n}{2} & \text{if n is even} \\ 3n + 1 & \text{if n is odd} \end{cases}f(n)={2n3n+1if n is evenif n is odd

Then the Collatz Conjecture states that regardless of which integer nnn you begin at, applying the function fff repeatedly to it will eventually result in reaching the number 111.

Applying fff repeatedly to 111 will result in the sequence 14211 → 4 → 2 → 11421 repeating, which is the 100, 10, 1 sequence we’ve seen in our earlier examples. Cole’s hypothesis and the Collatz Conjecture are equivalent.

However, the Collatz Conjecture, at this time of writing, has not yet been solved. If either Cole’s hypothesis or the Collatz Conjecture is proven or disproven, then the other one is automatically proven or disproven too. Until then, we’ve got some ways to go.

Try These Next