[go: up one dir, main page]

login
Triangle read by rows: T(n,k) (1 <= k <= n) given by T(n,1) = T(n,n) = 1, otherwise T(n, k) = (m*n-m*k+1)*T(n-1,k-1) + (m*k-m+1)*T(n-1,k), where m = -1.
21

%I #33 May 31 2023 09:51:04

%S 1,1,1,1,0,1,1,-1,-1,1,1,-2,2,-2,1,1,-3,2,2,-3,1,1,-4,7,-8,7,-4,1,1,

%T -5,9,-5,-5,9,-5,1,1,-6,16,-26,30,-26,16,-6,1,1,-7,20,-28,14,14,-28,

%U 20,-7,1,1,-8,29,-64,98,-112,98,-64,29,-8,1,1,-9,35,-75,90,-42,-42,90,-75,35,-9,1

%N Triangle read by rows: T(n,k) (1 <= k <= n) given by T(n,1) = T(n,n) = 1, otherwise T(n, k) = (m*n-m*k+1)*T(n-1,k-1) + (m*k-m+1)*T(n-1,k), where m = -1.

%C Row sums are: {1, 2, 2, 0, 0, 0, 0, 0, 0, 0, ...}.

%C For m = ...,-1,0,1,2 we get ..., A144431, A007318 (Pascal), A008292, A060187, ..., so this might be called a sub-Pascal triangle.

%C The triangle starts off like A098593, but is different further on.

%H G. C. Greubel, <a href="/A144431/b144431.txt">Rows n = 1..50 of the triangle, flattened</a>

%H Robert Coquereaux and Jean-Bernard Zuber, <a href="https://arxiv.org/abs/2305.01100">Counting partitions by genus. II. A compendium of results</a>, arXiv:2305.01100 [math.CO], 2023. See p. 8.

%F T(n,k) = (m*n - m*k + 1)*T(n-1, k-1) + (m*k - (m-1))*T(n-1, k) with T(n, 1) = T(n, n) = 1 and m = -1.

%F From _G. C. Greubel_, Mar 01 2022: (Start)

%F T(n, n-k) = T(n, k).

%F T(n, k) = (-1)^(k-1)*binomial(n-3, k-1) + (-1)^(n+k)*binomial(n-3, k-3) with T(1, k) = T(2, k) = 1.

%F Sum_{k=1..n} T(n, k) = [n==1] + 2*[n==2] + 2*[n==3] + (1-(-1)^n)*0^(n-3)*[n>3]. (End)

%e Triangle begins:

%e 1;

%e 1, 1;

%e 1, 0, 1;

%e 1, -1, -1, 1;

%e 1, -2, 2, -2, 1;

%e 1, -3, 2, 2, -3, 1;

%e 1, -4, 7, -8, 7, -4, 1;

%e 1, -5, 9, -5, -5, 9, -5, 1;

%e 1, -6, 16, -26, 30, -26, 16, -6, 1;

%e 1, -7, 20, -28, 14, 14, -28, 20, -7, 1;

%e ...

%p T:=proc(n,k,l) option remember;

%p if (n=1 or k=1 or k=n) then 1 else

%p (l*n-l*k+1)*T(n-1,k-1,l)+(l*k-l+1)*T(n-1,k,l); fi; end;

%p for n from 1 to 15 do lprint([seq(T(n,k,-1),k=1..n)]); od; # _N. J. A. Sloane_, May 08 2013

%t m=-1;

%t T[n_, 1]:= 1; T[n_, n_]:= 1;

%t T[n_, k_]:= (m*n-m*k+1)*T[n-1, k-1] + (m*k - (m - 1))*T[n-1,k];

%t Table[T[n, k], {n,15}, {k,n}]//Flatten

%o (Sage)

%o def A144431(n,k):

%o if (n<3): return 1

%o else: return (-1)^(k-1)*binomial(n-3, k-1) + (-1)^(n+k)*binomial(n-3, k-3)

%o flatten([[A144431(n,k) for k in (1..n)] for n in (1..15)]) # _G. C. Greubel_, Mar 01 2022

%Y Cf. A007318, A008292, A060187, A098593.

%K tabl,easy,sign

%O 1,12

%A _Roger L. Bagula_, Oct 04 2008

%E Edited by _N. J. A. Sloane_, May 08 2013