%I #23 Jan 04 2024 21:40:31
%S 0,1,-1,3,2,-3,5,-2,4,-7,11,-6,-4,8,-15,17,6,-12,-8,16,-31,26,-9,15,
%T -27,-19,35,-66,7,19,-28,43,-70,-51,-86,-20,12,-5,24,-52,-95,-25,-26,
%U -60,-40,21,9,-14,-38,14,-109,-84,58,-118,-78,10,-11,20,34,-72,86,-195,-111,-169,51,-129,23,13,-24,-44,78,-150
%N 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 smallest available one 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="/A330656/b330656.txt">Table of n, a(n) for n = 1..5151</a>
%H Eric Angelini on Math-Fun mailing list, March 31 <a href="https://mailman.xmission.com/cgi-bin/mailman/private/math-fun/2020-March/034568.html">
%e The upper-left corner of the array starts like this:
%e ...0....1....3....5...11...17...26....7...12...21...10...23...
%e ..-1....2...-2...-6....6...-9...19...-5....9..-11...13..-16...
%e ..-3....4...-4..-12...15..-28...24..-14...20..-24...29..-34...
%e ..-7....8...-8..-27...43..-52..-38...34..-44...53..-63...82...
%e .-15...16..-19..-70..-95...14..-72...78..-97..116.-145.-192...
%e .-31...35..-51..-25.-109...86.-150.-175.-213..261..-47.-171...
%e .-66..-86..-26..-84.-195.-236...25...38.-474.-308.-124..117...
%e .-20..-60...58.-111..-41.-261..-13.-512.-166.-184.-241.-339...
%e .-40.-118.-169...70.-220.-248.-499.-346..-18..-57...98.-361...
%e .-78...51.-239..290...28.-251.-153.-328..-39.-155.-459..475...
%e -129.-290.-529.-262.-279..-98..175.-289.-116.-304.-934.-160...
%e -161..239.-267..-17.-181.-273.-464.-173..188.-630.-774.-364...
%e ...
%e The first row starts with 0. We prolong it with the smallest unused positive 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 the next smallest available integer not yet in the array, which is 3:
%e ..0....1.....3
%e ....-1....c..
%e To compute c, we try first "smallest term minus biggest one":
%e ..0....1.....3
%e ....-1...-2..
%e .......d.....
%e But the result -2 result will lead to a term d being either -1 or +1, which are both already in the array; we then try, at the upper level, "biggest term minus smallest term" (this is 3 minus 1 = 2), which produces now a new term c = 3 - 1 and a new hope to compute a term d fitting the array:
%e ..0....1.....3
%e ....-1....2..
%e .......d.....
%e Indeed, the operation "smallest term minus biggest one" works now to find d as -1 minus 2 is -3, a term not yet in the array:
%e ..0.....1....3
%e ....-1....2..
%e .......-3.....
%e As the last antidiagonal is completed, we try to complete a new one with k, l, m and n, with k, l, m, n not being already in the array:
%e ..0....1....3.....k
%e ....-1...+2....l..
%e ......-3.....m....
%e ..........n.......
%e etc.
%Y Cf. A330903 where a similar idea is developed, but with positive terms only on the first row. A327743 [a(n) = smallest positive number not already in the sequence such that for each k = 1, ..., n-1, the k-th differences are distinct].
%K sign,tabl,base
%O 1,4
%A _Eric Angelini_ and _Carole Dubois_, Apr 27 2020
|