The "two-infinite" array

 

A new array for the OEIS?

               0    +1    +3      +7     +11      +5     +14   ...
                 -1    +2     -4      +4      -6      +9    ...
                    -3    +6      -8     -10     -15     ...
                       -9    -14      -2     -25     ...
                          -5     -12     -23     ...
                              -7     -35     ...
                                 -28     ...
                                     ...
                              
The idea is to insert in an infinite “triangular” array, all integers from -∞ to +∞, with no duplicates.

[This is now A330656 in the OEIS, thanks to Carole Dubois]

We start, as usual, in the upper left corner with 0. The array now is filled with those two rules:
Rule 1) we always try to extend the upper row with the smallest positive integer a(n) not present so far in A (A is the array), integer that doesn’t lead to a contradiction immediately, or later in the rows below it;
Rule 2) a(n) and a(n-1), the term at the left of a(n), produce another integer in the row below them; this term is the difference (smallest term – biggest term). If this leads to a contradiction (immediately or later in the antidiagonal), we try (biggest term – smallest term). If both operations lead to a contradiction, we try a(n)+1 instead of a(n) and repeat the whole process, filling A by antidiagonals.

Example:
After 0, we write 1 because this 1 doesn’t lead to a contradiction: we will have -1 below the pair (as 0 – 1 = -1):

          0    +1    +3      +7     +11      +5     +14   ...
            -1    +2     -4      +4      -6      +9    ...
               -3    +6      -8     -10     -15     ...
                  -9    -14      -2     -25     ...
                     -5     -12     -23     ...
                         -7     -35     ...
                            -28     ...
                                ...

We have now a(1) = 0 and a(2) = 1; what could a(3) be?
The smallest unused positive integer in A is a(3) = 2; let’s try:                              

          0    +1    +2        ...
            -1     a     ...

The second rule says “try first (small – big)” which produces 1 – 2 = -1, a term already in A; we thus try to subtract the other way: 2 – 1 = 1, a term already in A too. So, a(3) = 2 doesn’t work. We try a(3) = 3 and follow the 2nd rule to compute their difference:

          0    +1    +3    ...
            -1    -2   ...
                b

But we have a problem with b now; either [(-1) – (-2)] or [(-2) – (-1)] will produce a term already in A (respectively +1 and -1).
We then climb the antidiagonal back, erase -2 and replace it with the result of (3 – 1), instead of (1 – 3):

          0    +1    +3    ...
            -1    +2   ...
                b

If we do now [(-1) – (2)] we get -3, which is ok:

          0    +1    +3     ...
            -1    +2    ...
               -3   ...

We try to extend A with a(4) = 4, the smallest unused positive integer in A; a contradiction arises immediately when we try to compute c:

          0    +1    +3     +4   ...
            -1    +2     c
               -3    ...
                  ...

Both ways to subtract produce either -1 or +1 which are in A; what about a(4) = 5?               

          0    +1    +3     +5   ...
            -1    +2     c
               -3    ...
                  ...

If we do 3 – 5, we get c = -2, which is ok for now. But what about d and e?

          0    +1    +3     +5   ...
            -1    +2    -2    ...
               -3     d    ...
                   e    ...

The second rule gives e = -4, which seems ok. But e is a mess:

          0    +1    +3     +5   ...
            -1    +2    -2    ...
               -3    -4    ...
                   e    ...

Both way to subtract “the parents” of e fail, giving respectively -1 and +1, which are both in A. Climbing back the antidiagonal leads us to try a(4) = 6 instead of a(4) = 5:

          0    +1    +3     +6   ...
            -1    +2     f
               -3    ...
                  ...

But as -3 and +3 are already in A, we must try a(4) = 7:

          0    +1    +3     +7    ...
            -1    +2     g     ...
               -3     h     ...
                   i    ...

a(4) = 7 will produce the “lexico-first” antidiagonal <+7, g, h, i> = <+7, -4, +6, -9> as g = -6 doesn’t work:

          0    +1    +3     +7    ...
            -1    +2     -4     ...
               -3    +6     ...
                  -9    ...

Etc.
My apologizes if the array A is wrong (I wouldn't be surprised) – but you get the idea.
Best,
É.
____________________
May 3rd 2020 update
Indeed, there were mistakes in the above array – now corrected here and published in the OEIS thanks to Carole Dubois' program – the graphs are beautiful!

We also computed this nice array – where the upper row of the square is made of positive AND negative terms:

....0.....1....-2.....3....-4.....6....-9.....7....-11.....12...

...-1....-3.....5....-7....10...-15....16...-18.....23....-28...

....2....-8...-12...-17...-25...-31....34...-41.....51....-57...

..-10.....4....-5.....8....-6...-65....75...-92....108...-120...

..-14.....9...-13....14...-59..-140..-167..-200...-228....253...

..-23....22...-27...-73....81....27...-33....28...-481...-527...

..-45....49...-46..-154...-54....60...-61..-509.....46..-1085...

..-94....95..-108...100..-114...121..-448..-555..-1131....-52...

.-189...203..-208...214..-235..-569..-107..-576..-1079..-1640...


.-392..-411..-422...449..-334..-462...469..-503...-561...-460...
...

Merci Carole !

Commentaires

Posts les plus consultés de ce blog

Beautés ?

Underline, reproduce

Le tripalin se présente