OFFSET
0,9
COMMENTS
LINKS
G. C. Greubel, Antidiagonals n = 0..50, flattened
FORMULA
T(n,k) = if(k mod 2 = 0, Product_{j=0..(k-2)/2} C(n+k/2+j,k/2) / C(k/2+j,k/2), (cos(Pi*n/2) + sin(Pi*n/2))*Product_{j=0..(k-3)/2} C(n+(k+1)/2+j,(k+1)/2)/C((k+1)/2+j,(k+1)/2)}).
EXAMPLE
Array begins
1, 1, 1, 1, 1, 1, ...
1, 1, 2, 3, 6, 10, ...
1, -1, 3, -6, 20, -50, ...
1, -1, 4, -10, 50, -175, ...
1, 1, 5, 15, 105, 490, ...
1, 1, 6, 21, 196, 1176, ...
As a number triangle, T(n-k,k) gives
1;
1, 1;
1, 1, 1;
1, -1, 2, 1;
1, -1, 3, 3, 1;
1, 1, 4, -6, 6, 1;
1, 1, 5, -10, 20, 10, 1;
1, -1, 6, 15, 50, -50, 20, 1;
MATHEMATICA
T[ n_, m_] := With[{k = Quotient[m + 1, 2]}, (-1)^(Quotient[n, 2] m) Product[ Binomial[n + k + j, k] / Binomial[k + j, k], {j, 0, k - 1 - Mod[m, 2]}]];
(* Michael Somos, Apr 03 2021 *)
PROG
(PARI) alias(C, binomial);
T(n, k) = if (k % 2 == 0, prod(j=0, (k-2)/2, C(n+k/2+j, k/2)/C(k/2+j, k/2)), (cos(Pi*n/2)+sin(Pi*n/2))*prod(j=0, (k-3)/2, C(n+(k+1)/2+j, (k+1)/2)/C((k+1)/2+j, (k+1)/2)));
tabl(nn) = matrix(nn, nn, n, k, round(T(n-1, k-1))); \\ Michel Marcus, Dec 10 2016
(PARI) T(n, m) = my(k = (m+1)\2); (-1)^(n\2*m) * prod(j=0, k-1-m%2, binomial(n+k+j, k) / binomial(k+j, k)); /* Michael Somos, Apr 03 2021 */
(Magma)
F:= Floor;
function t(n, k)
if k eq 0 then return 1;
elif k eq 1 then return (-1)^F(n/2);
elif (k mod 2) eq 0 then return (&*[ Binomial(n+F(k/2)+j, F(k/2))/Binomial(F(k/2)+j, F(k/2)) : j in [0..F((k-2)/2)] ]);
else return (-1)^F(n/2)*(&*[ Binomial(n+F((k+1)/2)+j, F((k+1)/2))/Binomial(F((k+1)/2)+j, F((k+1)/2)) : j in [0..F((k-3)/2)] ]);
end if;
end function;
// [[t(n, k): k in [0..10]]: n in [0..10]];
A133815:= func< n, k | t(n-k, k) >;
[A133815(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 16 2023
(SageMath)
def f(k): return (k+1)//2
def t(n, k): return (-1)^(k*(n//2))*product(binomial(n+f(k) +j, f(k))/binomial(f(k) +j, f(k)) for j in range(f(k-1)))
def A133815(n, k): return t(n-k, k)
flatten([[A133815(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Mar 16 2023
CROSSREFS
KEYWORD
AUTHOR
Paul Barry, Sep 24 2007
STATUS
approved