OFFSET
1,2
COMMENTS
LINKS
G. C. Greubel, Antidiagonal rows n = 1..100
FORMULA
T(n,k) = 5*T(n,k-1) - 10*T(n,k-2) + 10*T(n,k-3) - 5*T(n,k-4) + T(n,k-5).
G.f. for row n: f(x)/g(x), where f(x) = n + x - (n - 1)^2 x^2 and g(x) = (1 - x)^5.
T(n,k) = k*(k^3 + 4*k^2*n + 6*k*n - k + 2*n)/12. - G. C. Greubel, Jul 05 2019
EXAMPLE
Northwest corner (the array is read by falling antidiagonals):
1....6....20....50....105....196...336
2....11...34....80....160....287...476
3....16...48....110...215....378...616
4....21...62....140...270....469...756
5....26...76....170...325....560...896
...
T(5,1) = (1)**(5) = 5
T(5,2) = (1,4)**(5,6) = 1*6+4*5 = 26
T(5,3) = (1,4,9)**(5,6,7) = 1*7+4*6+9*5 = 76
MATHEMATICA
(* First program *)
b[n_]:= n^2; c[n_]:= n;
T[n_, k_]:= Sum[b[k-i] c[n+i], {i, 0, k-1}]
TableForm[Table[T[n, k], {n, 1, 10}, {k, 1, 10}]]
Flatten[Table[T[n-k+1, k], {n, 12}, {k, n, 1, -1}]] (* A213503 *)
r[n_]:= Table[T[n, k], {k, 40}] (* columns of antidiagonal triangle *)
d = Table[T[n, n], {n, 1, 40}] (* A117066 *)
s[n_]:= Sum[T[i, n+1-i], {i, 1, n}]
s1 = Table[s[n], {n, 1, 50}] (* A033455 *)
(* Second program *)
Table[(n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12, {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jul 05 2019 *)
PROG
(PARI) t(n, k) = (n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12;
for(n=1, 12, for(k=1, n, print1(t(n, k), ", "))) \\ G. C. Greubel, Jul 05 2019
(Magma) [[(n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12: k in [1..n]]: n in [1..12]]; // G. C. Greubel, Jul 05 2019
(Sage) [[(n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12 for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jul 05 2019
(GAP) Flat(List([1..12], n-> List([1..n], k-> (n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12))) # G. C. Greubel, Jul 05 2019
CROSSREFS
KEYWORD
AUTHOR
Clark Kimberling, Jun 16 2012
STATUS
approved