OFFSET
0,1
LINKS
G. C. Greubel, Rows n = 0..25 of the triangle, flattened
FORMULA
EXAMPLE
2;
1, 1;
1, 8, 1;
1, 131, 131, 1;
1, 8204, 29216, 8204, 1;
1, 2097187, 44136233, 44136233, 2097187, 1;
1, 2147483736, 846839476071, 503464582368, 846839476071, 2147483736, 1;
MATHEMATICA
f[n_, k_]:= If[k<=n, Eulerian[n*k+1, n-k], Eulerian[n*(n-k)+1, k]];
T[n_, k_]:= f[n, k] + f[n, n-k];
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Jan 11 2022 *)
PROG
(Magma)
Eulerian:= func< n, k | (&+[(-1)^j*Binomial(n+1, j)*(k-j+1)^n: j in [0..k+1]]) >;
f:= func< n, k | k le n select Eulerian(n*k+1, n-k) else Eulerian(n*(n-k)+1, k) >;
A157117:= func< n, k | f(n, k) + f(n, n-k) >;
[A157117(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 11 2022
(Sage)
def Eulerian(n, k): return sum((-1)^j*binomial(n+1, j)*(k-j+1)^n for j in (0..k+1))
def f(n, k): return Eulerian(n*k+1, n-k) if (k<n+1) else Eulerian(n*(n-k)+1, k)
def A157117(n, k): return f(n, k) + f(n, n-k)
flatten([[A157117(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jan 11 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 23 2009
EXTENSIONS
Edited by G. C. Greubel, Jan 11 2022
STATUS
approved