login
Triangle of expansion coefficients of the sum of an n X n array with equal top row and left column (extended by the rule of Pascal's triangle) in terms of the top row elements.
0

%I #23 Nov 04 2023 05:33:52

%S 1,1,4,1,12,6,1,40,20,8,1,140,70,30,10,1,504,252,112,42,12,1,1848,924,

%T 420,168,56,14,1,6864,3432,1584,660,240,72,16,1,25740,12870,6006,2574,

%U 990,330,90,18,1,97240,48620,22880,10010,4004,1430,440,110,20

%N Triangle of expansion coefficients of the sum of an n X n array with equal top row and left column (extended by the rule of Pascal's triangle) in terms of the top row elements.

%C Define a finite n X n square array with indeterminate elements A(1, c), c=1..n in the top row, the same elements A(r,1 ) = A(1,r) in the first column, r=1..n, and the remaining elements defined by the Pascal triangle rule: A(r,c) = A(r,c-1)+A(r-1,c).

%C The triangle T(n,m) gives the coefficients in the formula Sum_{r=1..n} Sum_{c=1..n} A(r,c) = Sum_{m=1..n} T(n,m) * A(1,m).

%C It says how many times the first, second, third, etc. element of the first row (or the first column) contributes to the sum of the n X n array.

%e 1;

%e 1,4;

%e 1,12,6;

%e 1,40,20,8;

%e 1,140,70,30,10;

%e 1,504,252,112,42,12;

%e 1,1848,924,420,168,56,14;

%e 1,6864,3432,1584,660,240,72,16;

%e 1,25740,12870,6006,2574,990,330,90,18;

%e 1,97240,48620,22880,10010,4004,1430,440,110,20;

%p A217234_row := proc(n)

%p local A,r,c,s ;

%p A := array({},1..n,1..n) ;

%p for r from 2 to n do

%p A[r,1] := A[1,r] ;

%p end do:

%p for r from 2 to n do

%p for c from 2 to n do

%p A[r,c] := A[r,c-1]+A[r-1,c] ;

%p end do:

%p end do:

%p s := add(add( A[r,c],c=1..n) ,r=1..n) ;

%p for c from 1 to n do

%p printf("%d,", coeff(s,A[1,c]) ) ;

%p end do:

%p return ;

%p end proc:

%p for n from 1 to 10 do

%p A217234_row(n) ;

%p printf(";\n") ;

%p end do; # _R. J. Mathar_, Oct 13 2012

%t A217234row [n_] := Module[{A, x, r, c, s }, A = Array[x, {n, n}]; Do[A[[r, 1]] = A[[1, r]], {r, 2, n}]; Do[A[[r, c]] = A[[r, c - 1]] + A[[r - 1, c]], {r, 2, n}, {c, 2, n}]; s = Sum[A[[r, c]], {r, 1, n}, {c, 1, n}]; If[n == 1, {1}, List @@ s /. x[_, _] -> 1]];

%t Table[A217234row[n], {n, 1, 10}] // Flatten (* _Jean-François Alcover_, Nov 04 2023, after _R. J. Mathar_ *)

%Y Cf. A100320 (2nd column), A000984 (third column), A162551 (third column), A024483 (4th column), A006659 (5th column), A002058 (6th column), A030662 (row sums).

%K nonn,tabl

%O 1,3

%A _J. M. Bergot_, Sep 28 2012

%E Edited by _R. J. Mathar_, Oct 13 2012

%E Typo in data corrected by _Jean-François Alcover_, Nov 04 2023