Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Saturday, 15 August 2026

ODD + and EVEN - Improved Format

Some time ago I got Gemini to carry out an analysis for me of attractors and vortices in the range up to 40000 under the ODD + and EVEN - algorithm. I copied the output into a Google document that listed: 

  • each attractor and how many captives it had
  • each vortex (along with the vorticals that comprised it)
  • the number of captives the vortex had
Here is the information the 193 page document displays for the attractor 39642:
  • Attractor: 39642
  • Captive Count: 395
  • Captives: [38997, 39017, 39035, 39037, 39039, 39053, 39055, 39059, 39063, 39065, 39070, 39071, 39072, 39073, 39074, 39075, 39076, 39077, 39078, 39083] ... (and 375 more)
Here is the information the documents displays for the vortex [38013, 38012, 38006, 37995, 38028]:
  • Vortex (Vorticals): [38013, 38012, 38006, 37995, 38028]
  • Captive Count: 564
  • Captives: [37055, 37075, 37097, 37099, 37107, 37123, 37125, 37127, 37133, 37135, 37137, 37139, 37141, 37143, 37145, 37149, 37150, 37151, 37152, 37153] ... (and 544 more)
The attractors and vortices are arranged in descending order by number of captives. The information is readily accessible but I thought I'd use Gemini again to improve the formatting of the document to make it more readable. Figure 1 shows the opening page of the 137 page document and Figure 2 shows the second page.


Figure 1


Figure 2

The document lists the attractors in ascending order and also in descending order by number of captives (see Tables 1 and 2 for the start of each table).


Table 1


Table 2

The document goes on to list vortices in ascending order and also in descending order by number of captives (see Tables 3 and 4):


Table 3


Table 4

Overall the document provides an excellent organisation of the data and I'll roll this out this the results for the ODD - and EVEN + algorithm and the PRIME + NON-PRIME - algorithm in the near future.

Monday, 30 March 2026

Number Testing for the Recaman Sequence

An interesting exercise is to determine how many iterations are required to reach a given number within the Recaman sequence. This is OEIS A057167. The initial terms that are listed in the OEIS are:

0, 1, 4, 2, 131, 129, 3, 5, 16, 14, 12, 10, 8, 6, 31, 29, 27, 25, 23, 99734, 7, 9, 11, 13, 15, 17, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 111, 22, 20, 18, 28, 30, 32, 222, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196

Notice 99734 that I've marked in red in the terms above. This corresponds to 19 and so a remarkable 99734 iterations are required to reach this modest number. Looking further at the \(b\) table, it can be seen that 61 requires an even more impressive 181653 iterations. Interestingly 76 requires the exact same number of iterations. 133 requires only slightly fewer at 181605 and 223 fewer still at 181545. These "spikes" are relatively infrequent. The next significant one is 879 that requires 328002 iterations. However, these are mere blips compared to the staggering number of iterations required for a number like 2406 (see Table 1).

Also of interest is the maximum number reached in the trajectory leading to a given number. I got Gemini to write a SageMath program that will calculate these two statistics (permalink). Let's say we enter the number 61. Here is the output:

Target Number: 61

Iterations Required: 181653

Highest Value Attained: 881467

I've incorporated this into my daily number analysis. My diurnal age today is 28120 and entering this number, the following output is obtained:

Position in Recaman Sequence:

Target Number: 28120

Iterations Required: 34191

Highest Value Attained: 180120

I also got Gemini to create a graph based on the OEIS A057167 b-table data that lists the number of iterations for the first 20,000 numbers. The program also lists the top ten values in that range. See Figure 1.


Figure 1: permalink

Table 1 shows the top ten in terms of number of iterations required:


Table 1: 
permalink

Wednesday, 7 January 2026

Code for Attractors, Vortices and Captives

Herein is an attempt to organise the code that I've gotten Gemini to write for me regarding attractors, vortices and captives.

Firstly, let's start with the ODD(+) and EVEN(-) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 1 and Figure 1). The default range is 0 to 40000.


Table 1: ODD(+) and EVEN(-)


Figure 1: red = attractor, orange = vortex, blue = captive

Secondly, let's continue with the ODD(-) and EVEN(+) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 2 and Figure 2). The default range is 0 to 40000.


Table 2: ODD(-) and EVEN(+)


Figure 2: red = attractor, orange = vortex, blue = captive

Thirdly, let's continue with the PRIME(+) and NON-PRIME(-) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 3 and Figure 3). The default range is 0 to 40000.


Table 3: PRIME(+) and NON-PRIME(-)


Figure 3: red = attractor, orange = vortex, blue = captive

Fourthly, let's continue with the PRIME(-) and NON-PRIME(+) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 4 and Figure 4). The default range is 0 to 40000.


Table 4: PRIME(-) and NON-PRIME(+)


Figure 4:  red = attractor, orange = vortex, blue = captive