login
Array read by ascending antidiagonals: T(n, k) = [x^k] cf(n) where cf(0) = 1, cf(1) = -1/(x - 1), and for n > 1 is cf(n) = ~( ~x - 1/(~x - 1/(~x - 1/(~x - 1/(~x - ... 1/(~x + 1))))...) ) where '~' is '-' if n is even, and '+' if n is odd, and x appears n times in the expression.
1

%I #19 Jun 12 2024 15:44:13

%S 1,1,0,1,1,0,1,2,1,0,1,3,1,1,0,1,4,3,1,1,0,1,5,6,5,1,1,0,1,6,10,14,8,

%T 1,1,0,1,7,15,30,31,13,1,1,0,1,8,21,55,85,70,21,1,1,0,1,9,28,91,190,

%U 246,157,34,1,1,0,1,10,36,140,371,671,707,353,55,1,1,0

%N Array read by ascending antidiagonals: T(n, k) = [x^k] cf(n) where cf(0) = 1, cf(1) = -1/(x - 1), and for n > 1 is cf(n) = ~( ~x - 1/(~x - 1/(~x - 1/(~x - 1/(~x - ... 1/(~x + 1))))...) ) where '~' is '-' if n is even, and '+' if n is odd, and x appears n times in the expression.

%e Generating functions of row n:

%e gf0 = 1;

%e gf1 = - 1/( x-1);

%e gf2 = x + 1/(-x+1);

%e gf3 = x - 1/( x-1/( x+1));

%e gf4 = x + 1/(-x-1/(-x-1/(-x+1)));

%e gf5 = x - 1/( x-1/( x-1/( x-1/( x+1))));

%e gf6 = x + 1/(-x-1/(-x-1/(-x-1/(-x-1/(-x+1)))));

%e .

%e Array begins:

%e [0] 1, 0, 0, 0, 0, 0, 0, 0, 0, ...

%e [1] 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e [2] 1, 2, 1, 1, 1, 1, 1, 1, 1, ... A373565

%e [3] 1, 3, 3, 5, 8, 13, 21, 34, 55, ... A373566

%e [4] 1, 4, 6, 14, 31, 70, 157, 353, 793, ... A373567

%e [5] 1, 5, 10, 30, 85, 246, 707, 2037, 5864, ... A373568

%e [6] 1, 6, 15, 55, 190, 671, 2353, 8272, 29056, ... A373569

%e A000217, A006322, A108675, ...

%e A000330, A085461, A244881, ...

%e .

%e Triangle starts:

%e [0] 1;

%e [1] 1, 0;

%e [2] 1, 1, 0;

%e [3] 1, 2, 1, 0;

%e [4] 1, 3, 1, 1, 0;

%e [5] 1, 4, 3, 1, 1, 0;

%e [6] 1, 5, 6, 5, 1, 1, 0;

%p row := proc(n, len) local x, a, j, ser;

%p if n = 0 then a := -1 elif n = 1 then a := -1/(x - 1) elif irem(n, 2) = 1 then

%p a := x + 1; for j from 1 to n-1 do a := x - 1 / a od: else

%p a := -x + 1; for j from 1 to n-1 do a := -x - 1 / a od: fi;

%p ser := series((-1)^(n-1)*a, x, len + 2); seq(coeff(ser, x, j), j = 0..len) end:

%p A := (n, k) -> row(n, 12)[k+1]: # array form

%p T := (n, k) -> row(n - k, k+1)[k+1]: # triangular form

%p seq(lprint([n], row(n, 9)), n = 0..9);

%o (SageMath)

%o def Arow(n, len):

%o R.<x> = PowerSeriesRing(ZZ, len)

%o if n == 0: return [1] + [0]*(len - 1)

%o if n == 1: return [1]*(len - 1)

%o x = x if n % 2 == 1 else -x

%o a = x + 1

%o for _ in range(n - 1):

%o a = x - 1 / a

%o if n % 2 == 0: a = -a

%o return a.list()

%o for n in range(8): print(Arow(n, 9))

%Y Cf. A373424, A276312 (main diagonal).

%Y Rows include: A373565, A373566, A373567, A373568, A373569.

%Y Columns include: A000217, A000330, A006322, A085461, A108675, A244881.

%K nonn,tabl

%O 0,8

%A _Peter Luschny_, Jun 09 2024