cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A363393 Triangle read by rows. T(n, k) = [x^k] (2 - Sum_{k=0..n} binomial(n, k)*Euler(k, 1)*(-2*x)^k).

Original entry on oeis.org

1, 1, 1, 1, 2, 0, 1, 3, 0, -2, 1, 4, 0, -8, 0, 1, 5, 0, -20, 0, 16, 1, 6, 0, -40, 0, 96, 0, 1, 7, 0, -70, 0, 336, 0, -272, 1, 8, 0, -112, 0, 896, 0, -2176, 0, 1, 9, 0, -168, 0, 2016, 0, -9792, 0, 7936, 1, 10, 0, -240, 0, 4032, 0, -32640, 0, 79360, 0
Offset: 0

Views

Author

Peter Luschny, Jun 04 2023

Keywords

Comments

The Swiss-Knife polynomials (A081658 and A153641) generate the dual triangle ('dual' in the sense of Euler-tangent versus Euler-secant numbers).

Examples

			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;
		

Crossrefs

Cf. A122045 (alternating row sums), A119880 (row sums), A214447 (central column), A155585 (main diagonal), A109573 (subdiagonal), A162660 (variant), A000364.

Programs

  • 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;
  • 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)])
  • 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())
    

Formula

For a recursion see the Python program.
T(n, k) = [x^k] P(n, x) where P(n, x) = (1 / (n + 1)) * Sum_{j=0..n+1} binomial(n + 1, j) * Bernoulli(j, 1) * (4^j - 2^j) * x^(j - 1).
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)).

Extensions

Simpler name by Peter Luschny, Nov 17 2024

A318254 Associated Omega numbers of order 2, triangle T(n,k) read by rows for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, -2, 1, 5, -20, 16, 1, 7, -70, 336, -272, 1, 9, -168, 2016, -9792, 7936, 1, 11, -330, 7392, -89760, 436480, -353792, 1, 13, -572, 20592, -466752, 5674240, -27595776, 22368256, 1, 15, -910, 48048, -1750320, 39719680, -482926080, 2348666880, -1903757312
Offset: 0

Views

Author

Peter Luschny, Aug 26 2018

Keywords

Comments

The Omega polynomials A318146 are defined by the recurrence P(m, 0) = 1 and for n>=1 P(m, n) = x * Sum_{k=0..n-1} binomial(m*n-1, m*k)*t(m, n-k)*P(m, k) where t(m, n) are the generalized tangent numbers A318253. The Omega numbers are the coefficients of the Omega polynomials. The associated Omega numbers are the weights of P(m, k) in the recurrence formula.

Examples

			Triangle starts:
[0] [1]
[1] [1,  1]
[2] [1,  3,   -2]
[3] [1,  5,  -20,    16]
[4] [1,  7,  -70,   336,    -272]
[5] [1,  9, -168,  2016,   -9792,    7936]
[6] [1, 11, -330,  7392,  -89760,  436480,   -353792]
[7] [1, 13, -572, 20592, -466752, 5674240, -27595776, 22368256]
		

Crossrefs

Even-indexed rows of A220901 (up to signs).
T(n, 0) = A005408, T(n, n) = A220901 (up to signs), row sums are A040000.
Cf. A318146, A318253, A318255 (m=3).

Programs

  • Maple
    # The function TNum is defined in A318253.
    T := (m, n, k) -> `if`(k=0, 1, binomial(m*n-1, m*(n-k))*TNum(m, k)):
    for n from 0 to 6 do seq(T(2, n, k), k=0..n) od;
  • Sage
    def AssociatedOmegaNumberTriangle(m, len):
        R = ZZ[x]; B = [1]*len; L = [R(1)]*len; T = [[1]]
        for k in (1..len-1):
            s = x*sum(binomial(m*k-1, m*(k-j))*B[j]*L[k-j] for j in (1..k-1))
            B[k] = c = 1 - s.subs(x=1); L[k] = R(expand(s + c*x))
            T.append([1] + [binomial(m*k-1, m*(k-j))*B[j] for j in (1..k)])
        return T
    A318254Triangle = lambda dim: AssociatedOmegaNumberTriangle(2, dim)
    print(A318254Triangle(8))

Formula

T(m, n, k) = binomial(m*n-1, m*(n-k))*A318253(m, k) for k>0 and 1 for k=0. We consider here the case m=2.
Showing 1-2 of 2 results.