OFFSET
1,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
FORMULA
T(n,k) = k*(n*k - n + 1), k>=1, n>=1.
EXAMPLE
Northwest corner:
1....4....9....16....25....36
1....6....15...28....45....66
1....8....21...40....65....96
1....10...27...52....85....126
MATHEMATICA
f[n_, 0]:=0; f[0, k_]:=0; (* Used to make weight array A185782 *)
f[n_, k_]:=k(n*k-n+1);
TableForm[Table[f[n, k], {n, 1, 10}, {k, 1, 15}]] (* this array *)
Table[f[n-k+1, k], {n, 14}, {k, n, 1, -1}]//Flatten
s[n_, k_]:=Sum[f[i, j], {i, 1, n}, {j, 1, k}]; (* acc array of {f(n, k)} *)
FullSimplify[s[n, k]]
TableForm[Table[s[n, k], {n, 1, 10}, {k, 1, 15}]] (* A185781 *)
Table[s[n-k+1, k], {n, 14}, {k, n, 1, -1}]//Flatten
w[m_, n_]:=f[m, n]+f[m-1, n-1]-f[m, n-1]-f[m-1, n]/; Or[m>0, n>0];
TableForm[Table[w[n, k], {n, 1, 10}, {k, 1, 15}]] (* array A185782 *)
Table[w[n-k+1, k], {n, 14}, {k, n, 1, -1}]//Flatten (* seq A185782 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Feb 03 2011
STATUS
approved