OFFSET
0,5
COMMENTS
LINKS
Peter Luschny, Illustrating the polynomials P363393.
Peter Luschny, Swiss-Knife polynomials and Euler numbers.
Peter Luschny, The Swiss-Knife polynomials.
FORMULA
For a recursion see the Python program.
Integral_{x=-n..n} P(n, x)/2 dx = n.
T(n, k) = [x^(n - k)] -(-2)^k * Euler(k, 1) / (x - 1)^(k + 1).
T(n, k) = n! * [x^(n - k)][y^n] exp(x*y) * (1 + tanh(y)).
EXAMPLE
The triangle T(n, k) starts:
[0] 1;
[1] 1, 1;
[2] 1, 2, 0;
[3] 1, 3, 0, -2;
[4] 1, 4, 0, -8, 0;
[5] 1, 5, 0, -20, 0, 16;
[6] 1, 6, 0, -40, 0, 96, 0;
[7] 1, 7, 0, -70, 0, 336, 0, -272;
[8] 1, 8, 0, -112, 0, 896, 0, -2176, 0;
[9] 1, 9, 0, -168, 0, 2016, 0, -9792, 0, 7936;
MAPLE
P := n -> add(binomial(n + 1, j)*bernoulli(j, 1)*(4^j - 2^j)*x^(j-1), j = 0..n+1) / (n + 1): T := (n, k) -> coeff(P(n), x, k):
seq(seq(T(n, k), k = 0..n), n = 0..9);
# Second program, based on the generating functions of the columns:
ogf := n -> -(-2)^n * euler(n, 1) / (x - 1)^(n + 1):
ser := n -> series(ogf(n), x, 16):
T := (n, k) -> coeff(ser(k), x, n - k):
for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
# Alternative, based on the bivariate generating function:
egf := exp(x*y) * (1 + tanh(y)): ord := 20:
sery := series(egf, y, ord): polx := n -> coeff(sery, y, n):
coefx := n -> seq(n! * coeff(polx(n), x, n - k), k = 0..n):
for n from 0 to 9 do coefx(n) od;
PROG
(SageMath)
def B(n: int):
return bernoulli_polynomial(1, n)
def P(n: int):
return sum(binomial(n + 1, j) * B(j) * (4^j - 2^j) * x^(j - 1)
for j in range(n + 2)) / (n + 1)
for n in range(10): print(P(n).list())
(Python)
from functools import cache
@cache
def T(n: int, k: int) -> int:
if k == 0: return 1
if k % 2 == 0: return 0
if k == n: return 1 - sum(T(n, j) for j in range(1, n, 2))
return (T(n - 1, k) * n) // (n - k)
for n in range(10): print([T(n, k) for k in range(n + 1)])
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Peter Luschny, Jun 04 2023
STATUS
approved