Exploring Collatz-Like Functions: The Power of 3n – 1

The mathematician, carried along on his flood of symbols, dealing apparently with purely formal truths, may still reach results of endless importance for our description of the physical universe.

Karl Pearson

Be careful! Do not attempt to solve this math problem – it’s very tempting, but it leads to never-ending cycles. Here’s how it works: Start with a positive integer. If it’s even, divide it by 2. If it’s odd, triple it and subtract 1. Keep doing this with the new number you get. We believe you’ll end up stuck in a loop, but we’re not entirely sure.

The 3n + 1 problem circulated by word of mouth for many years. It is generally attributed to Lothar Collatz, who was interested in graphical representations of the iteration of functions. Let us define the function f by

In this problem, start with any positive integer n. If n is even, divide it by 2; if n is odd, multiply it by 3 and add 1. Repeat this process, no matter the initial value of n, the sequence will eventually reach the cycle 4 → 2 → 1 → 4 → 2 → 1 → ‧ ‧ ‧ In a recent talk on the Collatz conjecture, Terrance Tao mentioned the following Collatz-like function h defined by:

Tao points out that in addition to the 2 → 1 → 2 → 1 → ‧ ‧ ‧ loop, two other loops appear. Can you find them? Let’s proceed to discover the other loops. First, let’s consider the first four positive integers.

n = 1:                    1 → 2 → 1 → 2 → 1 → ‧ ‧ ‧

n = 2:                    2 → 1 → 2 → 1 → 2 → 1 → ‧ ‧ ‧

n = 3:                    3 → 8 → 4 → 2 → 1 → ‧ ‧ ‧

n = 4:                    4 → 2 → 1 → 2 → 1 → ‧ ‧ ‧

We cannot see any other loop except the one mentioned above (2 → 1 → 2 → 1 → ‧ ‧ ‧ loop). Considering the number 5, we encounter the first occurrence of finding another loop (5 → 14 → 7 → 20 → 10 → 5 → ‧ ‧ ‧ loop). This loop is a bit longer than the previous one.

n = 5:                    5 → 14 → 7 → 20 → 10 → 5 → 14 → 7 → 20 → 10 → 5 → ‧ ‧ ‧

n = 6:                    6 → 3 → 8 → 4 → 2 → 1 → ‧ ‧ ‧

n = 7:                    7 → 20 → 10 → 5 → 14 → 7 → 20 → 10 → 5 → ‧ ‧ ‧

n = 8:                    8 → 4 → 2 → 1 → …

n = 9:                    9 → 26 → 13 → 38 → 19 → 56 → 28 → 14 → 7 → 20 → 10 → 5 → …

n = 10:                  10 → 5 → 14 → 7 → 20 → 10 → 5 → …

n = 11:                  11 → 32 → 16 → 8 → 4 → 2 → 1 → …

n = 12:                  12 → 6 → 3 → 8 → 4 → 2 → 1 → …

n = 13:                  13 → 38 → 19 → 56 → 28 → 14 → 7 → 20 → 10 → 5 → …

n = 14:                  14 → 7 → 20 → 10 → 5 → …

n = 15:                  15 → 44 → 22 → 11 → 32 → 16 → 8 → 4 → 2 → 1 → …

n = 16:                  16 → 8 → 4 → 2 → 1 → …

We can observe any one of the above-mentioned loops as long as the number is less than or equal to 16. However, if we consider the next positive integer, 17, we can discover a loop (17 → 50 → 25 → 74 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → ‧ ‧ ‧ loop) that is larger than all the loops mentioned above.

n = 17:                  17 → 50 → 25 → 74 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → 50 → 25 → …

n = 18:                  18 → 9 → 26 → 13 → 38 → 19 → 56 → 28 → 14 → 7 → 20 → 10 → 5 → 14 → 7 → 20 → 10 → 5 …

n = 19:                  17 → 50 → 25 → 74 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → 50 → 25 → …

n = 20:                  17 → 50 → 25 → 74 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → 50 → 25 → …

n = 21:                  21 → 62 → 31 → 92 → 46 → 23 → 68 → 34 → 17 → 50 → 25 → 74 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → 50 → 25 → …

n = 22:                  22 → 11 → 32 → 16 → 8 → 4 → 2 → 1 → …

n = 23:                  23 → 68 → 34 → 17 → 50 → 25 → 74 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → 50 → 25 → …

n = 24:                  24 → 12 → 6 → 3 → 8 → 4 → 2 → 1 → …

n = 25:                  25 → 37 → 110 → 55 → 164 → 82 → 41 → 122 → 61 → 182 → 91 → 272 → 136 → 68 → 34 → 17 → 50 → 25 → …

A comparative study for the functions f and h as given above. Let us consider the following examples to compare f and h:

We can see from these examples that when n is a power of 2, both f and g produce the same numbers at the same time. Otherwise, the rates at which f and h reach any particular loop are different.

Try This Consider the following function g defined by

Compare f, h, and g using specific examples.

This blog is as much yours as it is mine. So, if you have got some ideas to share what you want to see in the next post, feel free to drop a line. We welcome your ideas with open arms and reverence! Looking forward to seeing you soon on “Math1089 Mathematics for All” for another fascinating mathematics blog.