login
A square array read by antidiagonals downwards (see Comments lines for definition).
3

%I #16 Jan 04 2024 21:11:17

%S 0,1,-1,-2,-3,2,3,5,-8,-10,-4,-7,-12,4,-14,6,10,-17,-5,9,-23,-9,-15,

%T -25,8,-13,22,-45,7,16,-31,-6,14,-27,49,-94,-11,-18,34,-65,-59,-73,

%U -46,95,-189,12,23,-41,75,-140,81,-154,-108,203,-392,-16,-28,51,-92,-167,27,-54,100,-208,-411,-19,13,29,-57

%N A square array read by antidiagonals downwards (see Comments lines for definition).

%C Consider the square array in the Example section.

%C From the second row on, every term t in the array is the difference between the two integers a and b above it (a is the one immediately above t and b is the one to the right of a). There are two ways to compute this term t: t = a - b or t = b - a. Here we always try first to compute t as "the smallest term minus the biggest term". If this operation produces at some point in the antidiagonal a term already present in the array, we stop to compute the successive differences and try instead "the biggest term minus the smallest term". If this operation fails too (we obtain at some point a term already in the array), we have to prolong the first row with another term k, this term being always the closest to zero available one (positive or negative, but positive if the distance is the same) not present in the array and not leading to a contradiction at any stage in the antidiagonal that k towers.

%H Carole Dubois, <a href="/A330903/b330903.txt">Table of n, a(n) for n = 1..5253</a>

%e The upper-left corner of this array starts like this:

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

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

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

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

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

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

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

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

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

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

%e ...

%e The first row starts with 0. We prolong it with the smallest unused integer so far. This is 1:

%e ..0...1

%e We compute immediately 0 - 1 = -1 to fill the first antidiagonal and get:

%e ..0....1

%e ....-1..

%e We cannot prolong the first row with 2 as this 2 would produce a contradiction for c:

%e ..0....1.....2

%e ....-1....c...

%e Indeed, either 1 - 2 or 2 - 1 would lead to c = -1 or +1, both results being already in the array. We then try to prolong the first row with -2:

%e ..0....1.....-2

%e ....-1....c....

%e To compute c, we try first "smallest term minus biggest one":

%e ..0....1.....-2

%e ....-1...-3....

%e .......d.......

%e According to the same law ("smallest term minus biggest one" first) we have d = -3 minus -1 which is -2; but as -2 is already in the array, we try to use the second law ("biggest term minus smallest one"); we have -1 minus -3 which is 2:

%e ..0....1.....-2

%e ....-1...-3....

%e .......2.......

%e As the last antidiagonal is completed, we try to build a new one with k, l, m and n, those k, l, m, n not being already in the array:

%e ..0....1....-2.....k

%e ....-1...-3.....l..

%e .......2.....m....

%e ..........n.......

%e etc.

%Y Cf. A330656 where a similar idea is developed, but without negative terms on the first row.

%K sign,tabl,look,base

%O 1,4

%A _Eric Angelini_ and _Carole Dubois_, May 01 2020