Wednesday, 6 January 2021

The Toothpick Sequence and Related Sequences

Yesterday I turned 26210 days old, a number that factorises simply to 2 x 5 x 2621. An initial search of the Online Encyclopaedia of Integer Sequences or OEIS didn't reveal anything to interest so I had to dig a bit deeper (see this post on my Pedagogical Posturing blog for more information on how to do this). Before too long, I found out that 26210 was the 151st member of OEIS A161330 which is why it didn't show up in a regular search.

 
  A161330

Snowflake (or E-toothpick) sequence           
                


To understand the members of this and similar sequences are determined, this resource was invaluable. Figure 1 shows the resource's interface. What's happening in Figure 1 is that two E-toothpicks have been placed together back-to-back


Figure 1

More toothpicks are added to the free ends according to the rules described in the OEIS comments:
The rule for adding new E-toothpicks is as follows. Each E has three ends, which initially are free. If the ends of two E's meet, those ends are no longer free. To go from round \(n\) to round \(n\)+1, we add an E-toothpick at each free end (extending that end in the direction it is pointing), subject to the condition that no end of any new E can touch any end of an existing E from round \(n\) or earlier. (Two new E's are allowed to touch.)

Figure 2 shows the situation when \(n\)=10 and there are 128 toothpicks:

Figure 2

Extending this process to \(n\)=151, we end up to 26210 E-toothpicks. The resource referred to earlier provides a neat table of all the results: See Figure 3.

Figure 3


Of course there are many other toothpick sequences. The drop-down menu for the main sequence in Figure 1 shows the main variants (with the E-toothpick ticked). See Figure 4.


Figure 4

However, within these main variants there are a great many more sub-variants. Let's start at the first sequence shown in Figure 4, namely OEIS A139250, the original toothpick sequence where the toothpick actually looks like a toothpick. See Figure 5 where the grid has been turned on (in Figure 2, the grid was turned off) and for \(n\)=1, there is one toothpick.


Figure 5

Figure 6 shows the situation when \(n\)=10 and there are 55 toothpicks:


Figure 6

We find that in the range between 26000 and 26999, we have:
  • \(n\)=230, we have 26159 toothpicks
  • \(n\)=231, we have 26383 toothpicks
  • \(n\)=232, we have 26555 toothpicks
  • \(n\)=233, we have 26767 toothpicks
It could be argued that with so many different toothpick sequences, almost any number will find a place in at least one of them. So I set out to test this hypothesis. Is there a toothpick sequence that contains 26211 (my diurnal age today)? It turns out that there is at least one sequence and it didn't take me long to find it. 26211 is the 8737th member of OEIS A26211. The sequences increases in multiples of 3 starting with 1, 3, 6, 9, 12, ... and so any number that is a multiple of 3 (as 26211 is) will be a member of the sequence. Figure 7 shows the pattern that is displayed when \(n\)=10 and there are 30 toothpicks:


Figure 7

So whether my hypothesis is true or not I don't know but it seems likely. There is even a three dimensional version of the toothpick sequence: OEIS 160160. Figure 8 shows what it looks like after ten stages:

Figure 8

It is made according to the plan:
Similar to A139250, except the toothpicks are placed in three dimensions, not two. The first toothpick is in the z direction. Thereafter, new toothpicks are placed at free ends, as in A139250, perpendicular to the existing toothpick, but choosing in rotation the x-direction, y-direction, z-direction, x-direction, etc.
The only member of the sequence in the range from 26000 to 26999 is the 76th member, 26759. The topic of toothpick sequences is a huge one and touches on fractals, cellular automata and many other areas. This post is merely a quick glimpse.

No comments:

Post a Comment