cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A330656 Square array read by antidiagonals downwards (see Comments lines for definition).

This page as a plain text file.
%I A330656 #30 Jan 09 2025 08:02:10
%S A330656 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 A330656 -27,-19,35,-66,7,19,-28,43,-70,-51,-86,-20,12,-5,24,-52,-95,-25,-26,
%U A330656 -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 A330656 Square array read by antidiagonals downwards (see Comments lines for definition).
%C A330656 Consider the square array in the Example section.
%C A330656 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.
%D A330656 Eric Angelini on Math-Fun mailing list, March 31 2020.
%H A330656 Carole Dubois, <a href="/A330656/b330656.txt">Table of n, a(n) for n = 1..5151</a>
%e A330656 The upper-left corner of the array starts like this:
%e A330656      0    1    3    5   11   17   26    7   12   21   10   23...
%e A330656     -1    2   -2   -6    6   -9   19   -5    9  -11   13  -16...
%e A330656     -3    4   -4  -12   15  -28   24  -14   20  -24   29  -34...
%e A330656     -7    8   -8  -27   43  -52  -38   34  -44   53  -63   82...
%e A330656    -15   16  -19  -70  -95   14  -72   78  -97  116 -145 -192...
%e A330656    -31   35  -51  -25 -109   86 -150 -175 -213  261  -47 -171...
%e A330656    -66  -86  -26  -84 -195 -236   25   38 -474 -308 -124  117...
%e A330656    -20  -60   58 -111  -41 -261  -13 -512 -166 -184 -241 -339...
%e A330656    -40 -118 -169   70 -220 -248 -499 -346  -18  -57   98 -361...
%e A330656    -78   51 -239  290   28 -251 -153 -328  -39 -155 -459  475...
%e A330656   -129 -290 -529 -262 -279  -98  175 -289 -116 -304 -934 -160...
%e A330656   -161  239 -267  -17 -181 -273 -464 -173  188 -630 -774 -364...
%e A330656 ...
%e A330656 The first row starts with 0. We prolong it with the smallest unused positive integer so far. This is 1:
%e A330656   0   1
%e A330656 We compute immediately 0 - 1 = -1 to fill the first antidiagonal and get:
%e A330656   0    1
%e A330656     -1
%e A330656 We cannot prolong the first row with 2 as this 2 would produce a contradiction for c:
%e A330656   0    1     2
%e A330656     -1    c
%e A330656 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 A330656   0    1     3
%e A330656     -1    c
%e A330656 To compute c, we try first "smallest term minus biggest one":
%e A330656   0    1     3
%e A330656     -1   -2
%e A330656        d
%e A330656 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 A330656   0    1     3
%e A330656     -1    2
%e A330656        d
%e A330656 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 A330656   0     1    3
%e A330656     -1    2
%e A330656        -3
%e A330656 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 A330656   0    1    3     k
%e A330656     -1   +2    l
%e A330656       -3     m
%e A330656           n
%e A330656 etc.
%Y A330656 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 A330656 sign,tabl,base
%O A330656 1,4
%A A330656 _Eric Angelini_ and _Carole Dubois_, Apr 27 2020