login
Triangle T read by rows: dot product <1,2,...,r> * <s+1,s+2,...,r,1,2,...,s>.
11

%I #16 Sep 08 2022 08:45:13

%S 1,5,4,14,11,11,30,24,22,24,55,45,40,40,45,91,76,67,64,67,76,140,119,

%T 105,98,98,105,119,204,176,156,144,140,144,156,176,285,249,222,204,

%U 195,195,204,222,249,385,340,305,280,265,260,265,280,305,340,506,451,407,374,352,341,341,352,374,407,451

%N Triangle T read by rows: dot product <1,2,...,r> * <s+1,s+2,...,r,1,2,...,s>.

%C Offset for r (the rows) is 1, for s (the columns) it is 0.

%H G. C. Greubel, <a href="/A094414/b094414.txt">Rows n = 0..100 of triangle, flattened</a>

%F T(r, s) = r*(2*r^2 + 3*r - 3*r*s + 1 + 3*s^2)/6, r >= 1, 0 <= s <= r-1.

%e Triangle begins as:

%e 1;

%e 5, 4;

%e 14, 11, 11;

%e 30, 24, 22, 24;

%e 55, 45, 40, 40, 45;

%e 91, 76, 67, 64, 67, 76;

%p T:=proc(r,s) if s>=r then 0 else r*(2*r^2+3*r+1-3*r*s+3*s^2)/6 fi end: for r from 1 to 11 do seq(T(r,s),s=0..r-1) od; # yields sequence in triangular form # _Emeric Deutsch_, Nov 27 2006

%t Table[n*((n+1)*(2*n+1) -3*k*(n-k))/6, {n,0,12}, {k,0,n-1}]//Flatten (* _G. C. Greubel_, Oct 30 2019 *)

%o (PARI) T(n,k) = n*((n+1)*(2*n+1) -3*k*(n-k))/6;

%o for(n=0,12, for(k=0,n-1, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Oct 30 2019

%o (Magma) [n*((n+1)*(2*n+1) -3*k*(n-k))/6: k in [0..n-1], n in [0..12]]; // _G. C. Greubel_, Oct 30 2019

%o (Sage) [[n*((n+1)*(2*n+1) -3*k*(n-k))/6 for k in (0..n-1)] for n in (0..12)] # _G. C. Greubel_, Oct 30 2019

%o (GAP) Flat(List([0..12], n-> List([0..n-1], k-> n*((n+1)*(2*n+1) -3*k*(n-k))/6 ))); # _G. C. Greubel_, Oct 30 2019

%Y Columns 0-6 are A000330, A006527, A026037, A026040, A026043, A026046, A026049.

%Y Row sums are A000537.

%Y See also A094415, A088003.

%K nonn,tabl

%O 0,2

%A _Ralf Stephan_, May 02 2004

%E More terms from _G. C. Greubel_, Oct 30 2019