OFFSET
1,2
FORMULA
A(n, k) = ((k - 1)*(k + 1)^(n+1) + k*n - k^2 + 1)/k^2.
O.g.f. of k-th column: x*(k - (k + 1)*x)/((1 - x)^2*(1 - (k + 1)*x)).
E.g.f. of k-th column: exp(x)*((k^2 - 1)*(exp(k*x) - 1) + k*x)/k^2.
A(2, n) = A008865(n+1).
EXAMPLE
The array begins:
1, 2, 3, 4, 5, ...
2, 7, 14, 23, 34, ...
3, 21, 57, 117, 207, ...
4, 62, 228, 586, 1244, ...
5, 184, 911, 2930, 7465, ...
6, 549, 3642, 14649, 44790, ...
...
MATHEMATICA
A[n_, k_]:=((k-1)*(k+1)^(n+1)+k*n-k^2+1)/k^2; Table[A[n-k+1, k], {n, 10}, {k, n}]//Flatten (* or *)
A[n_, k_]:=SeriesCoefficient[x*(k-(k+1)*x)/((1-x)^2*(1-(k+1)*x)), {x, 0, n}]; Table[A[n-k+1, k], {n, 10}, {k, n}]//Flatten (* or *)
A[n_, k_]:=n!SeriesCoefficient[Exp[x]((k^2-1)(Exp[k x]-1)+k x)/k^2, {x, 0, n}]; Table[A[n-k+1, k], {n, 10}, {k, n}]//Flatten
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Stefano Spezia, May 29 2023
STATUS
approved