Showing posts with label unbounded. Show all posts
Showing posts with label unbounded. Show all posts

Tuesday, 17 March 2026

There Can Be Only One 3

Let's recall the Fibonacci-like sequence from my previous two blog posts titled There Can Be Only One 1 and There Can Only Be One 2.

We start with a digit \(d\) between 0 and 9 and any integer \(s\) that does not contain \(d\). For example, 1 and 2 would be suitable. After that we begin the Fibonacci process using \(d\) and \(s\) as our seeds except that whenever a number appears containing one or more digits \(d\), they are all removed.

So far I've looked at:

  • \(d=1\) and \(s=2\) leading to a sequence that loops
  • \(d=1\) and \(s=24\) leading to a sequence that loops
  • \(d=1\) and \(s=70\) leading to a sequence that loops
  • \(d=2\) and \(s=1\) leading to sequence that is probably unbounded
  • \(d=2\) and \(s=5\) leading to a sequence that loops
Now let's look at what happens when we set \(d=3\) and \(s=1\). We very quickly end up with a sequence that loops. Here is the trajectory and Figure 1 shows the graph:

3, 1, 4, 5, 9, 14, 2, 16, 18, 4, 22, 26, 48, 74, 122, 196, 18, 214, 22


Figure 1: permalink

Once we set \(s=2\) and maintain \(d=3\), we get a longer sequence but it eventually loops. Here is the trajectory and Figure 2 shows the graph:

3, 2, 5, 7, 12, 19, 1, 20, 21, 41, 62, 10, 72, 82, 154, 26, 180, 206, 86, 292, 78, 70, 148, 218, 66, 284, 50, 4, 54, 58, 112, 170, 282, 452, 74, 526, 600, 1126, 1726, 2852, 4578, 740, 518, 1258, 1776, 4, 1780, 1784, 564, 248, 812, 1060, 1872, 292, 2164, 2456, 4620, 7076, 11696, 18772, 468, 19240, 19708, 8948, 28656, 7604, 6260, 1864, 8124, 9988, 18112, 28100, 46212, 7412, 5624, 106, 570, 676, 1246, 1922, 168, 2090, 2258, 448, 2706, 154, 2860, 14, 2874, 2888, 5762, 8650, 14412, 2062, 16474, 1856, 180


Figure 2: permalink

The sequence reaches a maximum of 46212 with the previous term being 28100. When these two numbers are added we get 74312 that collapses to 7412 and from there it struggles and eventually enters a loop.

It is only with \(d=3\) and \(s=4\) that we get a seemingly unbounded sequence (I tested to 10 million). Here is the trajectory and Figure 3 shows the graph:

3, 4, 7, 11, 18, 29, 47, 76, 12, 88, 100, 188, 288, 476, 764, 1240, 2004, 244, 2248, 2492, 4740, 722, 5462, 6184, 11646, 1780, 1426, 206, 162, 68, 20, 88, 108, 196, 4, 200, 204, 404, 608, 1012, 1620, 262, 1882, 2144, 4026, 6170, 10196, 1666, 11862, 1528, 190, 1718, 1908, 626, 254, 880, 114, 994, 1108, 2102, 210, 212, 422, 64, 486, 550, 106, 656, 762, 1418, 2180, 598, 2778, 76, 2854, 290, 144, 44, 188, 22, 210, 22, 22, 44, 66, 110, 176, 286, 462, 748, 1210, 1958, 168, 2126, 2294, 4420, 6714, 1114, 7828, 8942, 16770, 25712


Figure 3: permalink

So that will probably do it for now. We've seen that it was only with \(d=1\) that we inevitably end up with sequences that loop for values of \(s<100\). For \(d>1\), the sequences can loop or increase without bound depending on the values of \(s\).

Monday, 16 March 2026

There Can Be Only One 2

Let's recall the Fibonacci-like sequence from my previous blog post titled There Can Be Only One 1.

We start with a digit \(d\) between 0 and 9 and any integer \(s\) that does not contain \(d\). For example, 1 and would be suitable. After that we begin the Fibonacci process using \(d\) and \(s\) as our seeds except that whenever a number appears containing one or more digits \(d\), they are all removed. 

In my previous post, I looked at three scenarios:

  • \(d=1\) and \(s=2\)
  • \(d=1\) and \(s=24\)
  • \(d=1\) and \(s=70\)
A major change occurs when we consider \(d=2\) as our "forbidden digit". Suddenly the 100 barrier can be breached as can be seen in Figure 1 where the sequence for \(d=2\) and \(s=1\) is depicted. Here the resulting sequence does not loop but exceeds the upper bound of 40000 that was set.


Figure 1: permalink

The sequence progresses like this:

[2, 1, 3, 4, 7, 11, 18, 9, 7, 16, 3, 19, 0, 19, 19, 38, 57, 95, 15, 110, 15, 15, 30, 45, 75, 10, 85, 95, 180, 75, 55, 130, 185, 315, 500, 815, 1315, 130, 1445, 1575, 300, 1875, 175, 50, 5, 55, 60, 115, 175, 90, 65, 155, 0, 155, 155, 310, ...

We can see that 155 + 155 = 310 jumps over the 200 barrier and from there it becomes seemingly unbounded (I tested up to ten million).

Not all values of \(s\) lead to unbounded sequences. For example, \(s=5\) leads quickly to a loop (see Figure 2): 

Starting Parameters: Forbidden Digit = 2, Second Number = 5

Max Value Limit: 40000
--------------------------------------------------
Resulting Sequence (17 terms):
[2, 5, 7, 1, 8, 9, 17, 6, 3, 9, 1, 10, 11, 1, 1, 0, 1]
--------------------------------------------------
Conclusion: The sequence entered a continuous loop.
The repeating pair that triggered the stop was: (0, 1)

Figure 2: permalink

Sequences are unbounded for \(s=1, 3, 4\) but loop for \(s=5, 6, 7, 8, 9, 10\) before becoming unbounded again for \(s=11\).