OFFSET
1,2
COMMENTS
See A144112 for the definition of accumulation array.
LINKS
G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
FORMULA
T(n,k) = (k*n/6)*(4*n^2 + 6*n*k + 4*k^2 - 3*n - 9*k + 4), k>=1, n>=1.
EXAMPLE
Northwest corner:
1, 5, 16, 38, 75
7, 24, 59, 120, 215
22, 54, 141, 262, 440
50, 136, 174, 480, 770
MATHEMATICA
f[n_, k_]:=2n-1+(2n+2k-4)(2n+2k-3)/2;
TableForm[Table[f[n, k], {n, 1, 10}, {k, 1, 15}]] (* A185868 *)
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}]; (* accumulation array of {f(n, k)} *)
FullSimplify[s[n, k]] (*formula for A185872 *)
g[n_]:=Sum[f[n+1-k, k], {k, 1, n}];
Table[g[n], {n, 50}] (* A185872 *)
TableForm[Table[s[n, k], {n, 1, 10}, {k, 1, 15}]]
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Feb 05 2011
STATUS
approved