.

# Iterative mapping of prime signatures

Written in

by

Perhaps the most elegant way of arranging all of the positive integers in a two-dimensional grid is the pairing function. The grid is populated by placing a 1 in its starting corner, then filling the grid with diagonal stripes: 2 and 3 in the first stripe, 4 through 6 in the second, and so on.

Below is such a table with the first few diagonals filled in:

### Table 1

The columns, rows and cross diagonals are easily-calculable integer sequences, and many of them appear in the Online Encyclopedia of Integer Sequences.1

Another way to arrange (almost) all of the positive integers in a two-dimensional grid is to arrange the grid so that each column contains all of the numbers with a given prime signature. In this grid, the first column would contain all the prime numbers, the second column would contain the squares of the prime numbers, and so on.

Here is a partial prime signature table:2

### Table S

A key difference between the two tables is that Table S does not include the number 1. This is because the first column starts with the first prime-containing prime signature, e.g. {1}. The number 1 does not contain any prime factors, and would be in a column by itself, since there are no other positive integers with no prime factors.

With the exception of the missing 1 in Table S, both tables contain each of the positive integers exactly once.

### Cross-mapping

Similar to the procedure used to create metaprime binary sequences and binary-encoded 🔺prime signature sequences, we can use both tables to repeatedly “encode” an integer into its Table 1 coordinate pair, then use that same coordinate pair to “decode” a number in Table S.

Let’s start with the number 1. In Table 1, we see its coordinate is row 1, column 1. Moving to Table S, we see the number occupying row 1, column 1 is the number 2.

Let’s take that “2” and return to Table 1. Its coordinates there are row 2, column 1. Moving to Table S, we see the number occupying row 2, column 1 is “3.”

So far, our sequence looks like this: 1, 2, 3…

By repeating the process, we will see the sequence build to 1, 2, 3, 4, 5, 9, 10, 8, 25, 343, 3969, 13090, 73344 and 77398016.

Once we reach 77398016, the row and column numbers are so large that it would require a bit of number-crunching to figure out what number resides at that location within Table S.3

Let’s try a new sequence. The smallest positive integer that didn’t appear in the previous sequence is 6, so let’s start with that.

In this case, our number (6) sits at the same place in both tables, so the sequence is simply an infinite series of sixes. Other numbers that map to themselves and thus create sequences that repeat forever are 7, 11, 132 and 568. (These appear to be the only numbers less than 10000 that map to themselves.)

Here is a table of the first few sequences we will encounter, arranged by the lowest number in the sequence (the column labeled “Seq.”) For known repeating sequences, the “Terms” column shows the period; otherwise, the number of terms found so far is shown.

Aside from the sequences containing 6, 7 and 11, which are repeating, the only other sequence whose type we can definitely see is sequence 1. We know that this must continue indefinitely: it cannot loop back to “1” because there is no “1” in Table S for it to loop back to.

The other sequences shown may be shown to be repeating once enough terms are discovered, or they may in fact be shown to be part of a non-repeating sequence, i.e. sequence 1. Sequence 1 can be shown to be the only sequence that has a definitive starting point, but no end: all other sequences must either loop back on themselves, or continue forever in both directions, since 1 is the only number in one table but not the other.

Here is Table 1 again, colored to show which numbers belong to which of the sequences described above:

### A variation of Table 1

There are a number of ways we can re-arrange Table 1 to see how the cross-mapping might be different.

The simplest way is to simply switch the rows and columns, like so:

### Table 1A

Let’s do the same cross-mapping between Tables 1A and S that we did for Tables 1 and S above.

Starting again with the number 1, we see its Table 1A coordinate is row 1, column 1. Moving to Table S, we see the number occupying row 1, column 1 is the number 2.

Taking that “2” and returning to Table 1A to repeat the process, we see the sequence build to 1, 2, 4, 6, 5, 9, 25, 343 and 844596301.

As before, we reach a number (844596301 in this case) with coordinates that would require some number-crunching to determine the next term in the sequence.4

Let’s try a new sequence. The smallest positive integer that didn’t appear in the previous sequence is 3, so let’s start with that.

It looks like 3 gives us another repeating series, consisting of an infinite series of threes. (Other numbers that repeat in the Table 1A to Table S mapping are 16, which can be found at row 1, column 6 of both tables, and 1416, which can be found at row 38, column 16.)

The next unused number is 7, so let’s use it to start a sequence.

In this case, the sequence loops back to its beginning: 7, 8, 10, 7…

Unlike the other repeating series we’ve found, this series has a period of 3, not 1.

Here is a table of the first few sequences we will encounter in the Table 1A/S cross-mapping:

Here is Table 1A, colored to show which numbers belong to which of the sequences described above:

### Open questions

Here are some open questions about these sequences:

• Which of the sequences shown (if any) will connect to other sequences if the sequence is extended far enough?
• Specifically, does Sequence 1 eventually link to any of the other sequences shown?
• What other repeating sequences are there? Are there any that have periods other than 1 or 3? (None less than 10,000 have been found.)

### Tables starting with 0

There are a number of other ways to modify Tables 1 and 1A to produce different sets of cross-mapping sequences.

For example, rather than start with the integer 1, these tables could start with 0 instead. Here are two versions of zero-based tables, color-colored as above (the sequences themselves follow.)

### Table 0A

In addition, the following numbers each map to themselves in the Table 0A mapping.

Note that the mapping sequences for Table 0 and Table 0A each contain two sequences with a starting term but no ending term: one starting at 0 and another starting at 1.

### Tables starting with 2

Instead of starting with 0 or 1, we can adjust Tables 1 and 1A to start with 2 instead. This way these tables will have the same integers that Table S has: all positive integers greater than 1. As above, the numbers have been color-colored to match the sequences listed below.

### Table 2A

Unlike the sequences for Tables 0, 0A, 1, and 1A, there are no sequences for Tables 2 and 2A that have a starting term but no ending term, since there are no numbers that are in Table 2 or 2A that are not also in Table S (and vice versa.)

If we were to create tables that start with 3 or a larger number, we would find sequences that have an ending term (e.g. 2), but no starting term.

There are other ways to create similar mapping sequences other than simply changing the starting number: different methods of distributing the numbers (such as those described in the pairing function page) could be used.

Depending on the starting number used and the manner in which the numbers are distrubted, new types of sequences will appear, such as finite sequences, and repeating sequences with periods other than what we’ve seen so far.

### Footnotes

1 The first row of Table 1 contains the positive “triangular numbers:” 1, 6, 3, 10, etc., which are included in OEIS sequence A000217. The first column (1, 2, 4, 7, etc.) forms the central polygonal numbers (A000124), and the diagonal starting from the top left corner (1, 5, 13, etc.) forms the centered square numbers (A001844.)

2 A larger version of Table S is also available, featuring 300 rows and 160 columns.

As with Table 1, many of the columns in Table S appear as sequences in the OEIS: the first column is the prime numbers (A000040), the second column is the squares of primes (A001248), the third column is the square-free semiprimes (A006881), etc.

The first two rows of Table S also appear as OEIS sequences: A025487 and A077560 respectively. The diagonal starting from the top left corner (2, 9, 14, 343, etc.) is sequence A178849.

There is also an OEIS sequence (A095904) that maps Table S against Table 0. It also maps to Tables 1 and 2 if the offset is adjusted accordingly. Sequence A179216 similarly maps Table S against Tables 0A, 1A and 2A.

Reverse mappings also have OEIS sequences: A179217 (the inverse function of A095904) maps Table 0 to Table S, and A179218 (the inverse function of A179216) maps Table 0A to Table S.

A full list of the OEIS sequences related to the sequences described on this page can be found on the OEIS 🔺page.

3 We do know that the next number in the sequence will be larger than 43589145600, which is the value of row 1, column 2555. (Shown as line item 2556 in the OEIS’s extended table of A025487, which matches column 2555 of Table S, due to the different starting offset.) Since each column is sorted smallest to largest, within a given column the numbers increase as the row number increases.

4 We do know that it will be much larger than 2 × 1014, which is the approximate value of the number at row 1, column 10000. Since each column is sorted smallest to largest, and within a given column the numbers increase as the row number increases, we can see that row 1, column 29250 will be larger than row 1, column 10000, and that row 11851, column 29250 will be larger than row 1, column 29250.