A shower thought turned into a beautiful Collatz visualization

May 20, 2025 - 02:00
 0  0

A shower thought turned into a beautiful Collatz visualization

I recently went on a nice long SCUBA diving trip with my wife and daughters. Lots of diving implies lots of showers, and lots of showers means lots of shower-thoughts! [1] An especially interesting one I had turned into a nice way to visualize some aspects of the Collatz Conjecture.

The Collatz Conjecture defines a very simple function on all positive integers as follows:

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

If you can prove that repeated applications of this function, starting from any positive integer, will eventually reach 1 then you have proved the Collatz Conjecture and won a million dollars and plenty of fame and glory! [2]

Individual inputs are trivial to verify. For example, if we start with 6, we get:

  • 6 is even, so 6 / 2 → 3
  • 3 is odd, so 3 × 3 + 1 → 10
  • 10 is even, so 10 / 2 → 5
  • 5 is odd, so 5 × 3 + 1 → 16
  • 16 is even, so 16 / 2 → 8
  • 8 is even, so 8 / 2 → 4
  • 4 is even, so 4 / 2 → 2
  • 2 is even, so 2 / 2 → 1

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0