Friday 25 March 2022

Odds 'n Evens Visualisation

I've written about the behaviour of numbers under the repeated application of the odds and evens rule in numerous posts but I'll recapitulate the rule here:

  • start with an number
  • any even digits are given a negative face value
  • any odd digits are given a positive face value
  • find the sum of the face value of the digits
  • add this sum to the number to generate a new number
  • repeat the process until a fixed value or a loop is reached
As an example, consider the number 111. Under the above rules we have, 111 --> 111+3 --> 114-2 --> 112 and a fixed value has been reached because 112 is invariant under the rule. Take 13 as an another example. The progression here is 13 --> 13+4 --> 17+8 --> 25+3 --> 28-10 --> 18-7 --> 11+2--> 13 and we are back where we started.


What I've attempted to do in Figure 1 is to show the behaviour of the numbers from 1 to 256 by inserting them into a 16 x 16 grid. I'll now explain the significance of the colours used.


Figure 2

Referring to Figure 2 : 1, 2, 3, 4, 6 and 8 are in white squares. These numbers all reach zero in one or two iterations. Thus for them 0 is the fixed point, although it is not marked on the grid. 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26 and 28 are all coloured the same but some numbers are bold and noticeably larger. These numbers (11, 13, 17, 18, 25 and 28) form a loop and the other numbers (smaller and not bold) will end up in this loop after repeated applications of the odds 'n evens rule. I've chosen the term vortices (plural of vortex) for such loops and vorticals for the numbers that comprise them. The numbers that fall into the loop are captives.

********************************************************************************


Figure 3

Referring to Figure 3 : the next numbers are in blue coloured squares and are clearly the most numerous. There is only one number that is bold and larger than the others. That number is 134 and it is invariant under the rule. All the other blue numbers have trajectories that lead to 134. I've chosen to call numbers like 134 attractors and the numbers that lead to them I've called captives.

********************************************************************************


Figure 4

Referring to Figure 4 : the next loop is made up of the numbers 54, 55, 64 and 65 and all the other similarly coloured numbers will end up in this loop or vortex.

********************************************************************************


Figure 5

Referring to Figure 5 : 112 is a number that is invariant under the rule and all the other similarly coloured numbers have trajectories that lead to 112. Having the same digits as 112 is 121 and so this too is a number that is also invariant under the rule. It has been made bold and larger but its square is left white because no other numbers have trajectories that lead to it. Similarly, 143, 156, 165, 187 and 211 are singletons and have no connections to the numbers around them. In the past I've called such numbers attractors, even though no other numbers are attracted to them. The preferable term might be isolates.

********************************************************************************


Figure 6

Referring to Figure 6 : 137 and 148 are larger and bold because they form a loop and the other similarly coloured numbers will all end up in this loop or vortex. These two number loops as we will see are fairly common.

********************************************************************************


Figure 7

Referring to Figure 7 : 155 and 166 similarly form a loop or vortex and all the other grey coloured numbers will enter this loop.

********************************************************************************


Figure 8

Referring to Figure 8 : 156 is invariant under the rule and all yellow coloured numbers have trajectories leading to 156. I've chosen the term attractor to describe numbers such as 156.

********************************************************************************


Figure 9

Referring to Figure 9 : 173 and 184 form a loop or vortex and the other brown coloured numbers will end up in this loop. 178 is invariant under the rule and other red coloured numbers have trajectories leading to 178. I've chosen to use the term attractor for numbers like 178.

********************************************************************************


Figure 10

Referring to Figure 10 : 198 and 200 form a loop and the other pink coloured numbers will end up in this loop or vortex.

********************************************************************************


Figure 11

Referring to Figure 11 : 209 and 216 form a loop and the other green coloured numbers will end up in this loop or vortex.

********************************************************************************


Figure 12

Referring to Figure 12 : 231, 233, 237, 245, 244 and 234 form a loop or vortex into which all the other similarly coloured numbers will end up. 239 and 249 to 256 have trajectories leading to a loop that is beyond the grid so they have been made grey.

The intention of this visualisation was to provide an overview of the behaviour of the first 256 counting numbers under the odds 'n evens rule. As can be clearly seen the numbers fall into various categories:
  • attractors: these are numbers that are invariant under the odds 'n evens rule and the trajectories of one or more other numbers (called captives) lead to them e.g. 112. This number has a total of nine captives: 93, 97, 105, 110, 111, 113, 114, 116, 118.

  • isolates: this is a new term that I've introduced to describe numbers that are invariant under the odds 'n evens rule but have no captives e.g. 121.

  • vorticals: this is a made-up word that I've used to describe numbers that form part of a vortex or loop. The trajectories of some other numbers, called captives, will end up in this vortex e.g. 209 is a vortical forming part of the vortex {209, 216}. The numbers 195, 197, 199, 207, 210, 212, 214, 215, 217, 218, 220, 221, 222, 223, 224, 225, 226, 228 are all captives of this vortex.

  • captives: these numbers have trajectories that lead either to an attractor or a vortex e.g. 113 is a captive of the attractor 112 while 224 is a captive of the vortex {209, 216}.
Below are some links to earlier posts relating to the odds 'n evens rule:

No comments:

Post a Comment