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-3 of 3 results.

A363394 Triangle read by rows. T(n, k) = A081658(n, k) + A363393(n, k) for k > 0 and T(n, 0) = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, -1, 1, 3, -3, -2, 1, 4, -6, -8, 5, 1, 5, -10, -20, 25, 16, 1, 6, -15, -40, 75, 96, -61, 1, 7, -21, -70, 175, 336, -427, -272, 1, 8, -28, -112, 350, 896, -1708, -2176, 1385, 1, 9, -36, -168, 630, 2016, -5124, -9792, 12465, 7936
Offset: 0

Views

Author

Peter Luschny, Jun 06 2023

Keywords

Examples

			The triangle T(n, k) begins:
  [0] 1;
  [1] 1, 1;
  [2] 1, 2,  -1;
  [3] 1, 3,  -3,   -2;
  [4] 1, 4,  -6,   -8,   5;
  [5] 1, 5, -10,  -20,  25,   16;
  [6] 1, 6, -15,  -40,  75,   96,   -61;
  [7] 1, 7, -21,  -70, 175,  336,  -427,  -272;
  [8] 1, 8, -28, -112, 350,  896, -1708, -2176,  1385;
  [9] 1, 9, -36, -168, 630, 2016, -5124, -9792, 12465, 7936;
		

Crossrefs

Variants (row reversed): A109449, A247453.
Cf. A081658 (signed secant part), A363393 (signed tangent part), A000111 (main diagonal), A122045, A155585 (aerated main diagonal), A000667, A062162 (row sums of signless variant).

Programs

  • Maple
    # Variant, computes abs(T(n, k)):
    P := n -> n!*coeff(series((sec(y) + tan(y))/exp(x*y), y, 24), y, n):
    seq(print(seq((-1)^(n - k)*coeff(P(n), x, n - k), k = 0..n)), n = 0..9);
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k == 0: return 1
        if k == n:
            p = k % 2
            return p - sum(T(n, j) for j in range(p, n - 1, 2))
        return (T(n - 1, k) * n) // (n - k)
    for n in range(10): print([T(n, k) for k in range(n + 1)])

Formula

|T(n, k)| = (-1)^(n - k) * n! * [x^(n - k)][y^n] (sec(y) + tan(y)) / exp(x*y).
T(n, k) = [x^(n - k)] -2^(k-(0^k))*(Euler(k, 0) + Euler(k, 1/2)) / (x-1)^(k + 1).
For a recursion see the Python program.
T(n, k) = [x^n] ((-1) + Sum_{j=0..n} binomial(n, j)*(Euler(j, 1) + Euler(j, 1/2))*(2*x)^j). - Peter Luschny, Nov 17 2024

A081658 Triangle read by rows: T(n, k) = (-2)^k*binomial(n, k)*Euler(k, 1/2).

Original entry on oeis.org

1, 1, 0, 1, 0, -1, 1, 0, -3, 0, 1, 0, -6, 0, 5, 1, 0, -10, 0, 25, 0, 1, 0, -15, 0, 75, 0, -61, 1, 0, -21, 0, 175, 0, -427, 0, 1, 0, -28, 0, 350, 0, -1708, 0, 1385, 1, 0, -36, 0, 630, 0, -5124, 0, 12465, 0, 1, 0, -45, 0, 1050, 0, -12810, 0, 62325, 0, -50521, 1, 0, -55, 0, 1650, 0, -28182, 0, 228525, 0, -555731, 0, 1, 0, -66, 0, 2475, 0
Offset: 0

Views

Author

Paul Barry, Mar 26 2003

Keywords

Comments

These are the coefficients of the Swiss-Knife polynomials A153641. - Peter Luschny, Jul 21 2012
Nonzero diagonals of the triangle are of the form A000364(k)*binomial(n+2k,2k)*(-1)^k.
A363393 is the dual triangle ('dual' in the sense of Euler-tangent versus Euler-secant numbers). - Peter Luschny, Jun 05 2023

Examples

			The triangle begins
[0] 1;
[1] 1, 0;
[2] 1, 0,  -1;
[3] 1, 0,  -3, 0;
[4] 1, 0,  -6, 0,   5;
[5] 1, 0, -10, 0,  25, 0;
[6] 1, 0, -15, 0,  75, 0,  -61;
[7] 1, 0, -21, 0, 175, 0, -427, 0;
...
From _Peter Luschny_, Sep 17 2021: (Start)
The triangle shows the coefficients of the following polynomials:
[1] 1;
[2] 1 -    x^2;
[3] 1 -  3*x^2;
[4] 1 -  6*x^2 +   5*x^4;
[5] 1 - 10*x^2 +  25*x^4;
[6] 1 - 15*x^2 +  75*x^4 -  61*x^6;
[7] 1 - 21*x^2 + 175*x^4 - 427*x^6;
...
These polynomials are the permanents of the n X n matrices with all entries above the main antidiagonal set to 'x' and all entries below the main antidiagonal set to '-x'. The main antidiagonals consist only of ones. Substituting x <- 1 generates the Euler tangent numbers A155585. (Compare with A046739.)
(End)
		

Crossrefs

Row reversed: A119879.

Programs

  • Maple
    ogf := n -> euler(n) / (1 - x)^(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;  # Peter Luschny, Jun 05 2023
    T := (n, k) -> (-2)^k*binomial(n, k)*euler(k, 1/2):
    seq(seq(T(n, k), k = 0..n), n = 0..9);  # Peter Luschny, Apr 03 2024
  • Mathematica
    sk[n_, x_] := Sum[Binomial[n, k]*EulerE[k]*x^(n - k), {k, 0, n}];
    Table[CoefficientList[sk[n, x], x] // Reverse, {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 04 2019 *)
    Flatten@Table[Binomial[n, k] EulerE[k], {n, 0, 12}, {k, 0, n}] (* Oliver Seipel, Jan 14 2025 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k == 0: return 1
        if k % 2 == 1:  return 0
        if k == n: return -sum(T(n, j) for j in range(0, n - 1, 2))
        return (T(n - 1, k) * n) // (n - k)
    for n in range(10):
        print([T(n, k) for k in range(n + 1)])  # Peter Luschny, Jun 05 2023
  • Sage
    R = PolynomialRing(ZZ, 'x')
    @CachedFunction
    def p(n, x) :
        if n == 0 : return 1
        return add(p(k, 0)*binomial(n, k)*(x^(n-k)-(n+1)%2) for k in range(n)[::2])
    def A081658_row(n) : return [R(p(n,x)).reverse()[i] for i in (0..n)]
    for n in (0..8) : print(A081658_row(n)) # Peter Luschny, Jul 20 2012
    

Formula

Coefficients of the polynomials in k in the binomial transform of the expansion of 2/(exp(kx)+exp(-kx)).
From Peter Luschny, Jul 20 2012: (Start)
p{n}(0) = Signed Euler secant numbers A122045.
p{n}(1) = Signed Euler tangent numbers A155585.
p{n}(2) has e.g.f. 2*exp(x)/(exp(-2*x)+1) A119880.
2^n*p{n}(1/2) = Signed Springer numbers A188458.
3^n*p{n}(1/3) has e.g.f. 2*exp(4*x)/(exp(6*x)+1)
4^n*p{n}(1/4) has e.g.f. 2*exp(5*x)/(exp(8*x)+1).
Row sum: A155585 (cf. A009006). Absolute row sum: A003701.
The GCD of the rows without the first column: A155457. (End)
From Peter Luschny, Jun 05 2023: (Start)
T(n, k) = [x^(n - k)] Euler(k) / (1 - x)^(k + 1).
For a recursion see the Python program.
Conjecture: If n is prime then n divides T(n, k) for 1 <= k <= n-1. (End)

Extensions

Typo in data corrected by Peter Luschny, Jul 20 2012
Error in data corrected and new name by Peter Luschny, Apr 03 2024

A377666 Array read by ascending antidiagonals: A(n, k) = Sum_{j = 0..k} binomial(k, j) * Euler(j, 0) *(2*n)^j.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -2, -3, 0, 1, 1, -3, -5, 11, 5, 1, 1, -4, -7, 46, 57, 0, 1, 1, -5, -9, 117, 205, -361, -61, 1, 1, -6, -11, 236, 497, -3362, -2763, 0, 1, 1, -7, -13, 415, 981, -15123, -22265, 24611, 1385, 1
Offset: 0

Views

Author

Peter Luschny, Nov 05 2024

Keywords

Examples

			Array A(n, k) starts:
  [0]  1,  1,   1,   1,    1,       1,        1, ...  A000012
  [1]  1,  0,  -1,   0,    5,       0,      -61, ...  A122045
  [2]  1, -1,  -3,  11,   57,    -361,    -2763, ...  A212435
  [3]  1, -2,  -5,  46,  205,   -3362,   -22265, ...  A225147
  [4]  1, -3,  -7, 117,  497,  -15123,   -95767, ...  A156201
  [5]  1, -4,  -9, 236,  981,  -47524,  -295029, ...  A377665
  [6]  1, -5, -11, 415, 1705, -120125,  -737891, ...
  [7]  1, -6, -13, 666, 2717, -262086, -1599793, ...
		

Crossrefs

Cf. A377663 (column 3), A377664 (main diagonal), A363393 (column polynomials).

Programs

  • Maple
    GHZeta := (k, n, m) -> m^(k+1)*Zeta(0, -k, 1/(m*n)):
    A := (n, k) -> ifelse(n = 0, 1, n^k*(GHZeta(k, n, 4) - GHZeta(k, n, 2))):
    for n from 0 to 7 do lprint(seq(A(n, k), k = 0..7)) od;
    # Alternative:
    P := proc(n, k) local j; 2*I*(1 + add(binomial(k, j)*polylog(-j, I)*n^j, j = 0..k)) end:
    A := n -> Im(P(n, k)): seq(lprint(seq(A(n, k), k = 0..7)), n = 0..7);
    # Computing the transpose using polynomials P from A363393.
    P := n -> add(binomial(n + 1, j)*bernoulli(j, 1)*(4^j - 2^j)*x^(j-1), j = 0..n+1)/(n + 1):
    Column := (k, n) -> subs(x = -n, P(k)):
    for k from 0 to 6 do seq(Column(k, n), n = 0..9) od;
    # According to the definition:
    A := (n, k) -> local j; add(binomial(k, j)*euler(j, 0)*(2*n)^j, j = 0..k):
    seq(lprint(seq(A(n, k), k = 0..6)), n = 0..7);
  • Mathematica
    A[n_, k_] := n^k (4^(k+1) HurwitzZeta[-k, 1/(4n)] - 2^(k + 1) HurwitzZeta[-k, 1/(2n)]);
  • SageMath
    from mpmath import *
    mp.dps = 32; mp.pretty = True
    def T(n, k):
        p = 2*I*(1+sum(binomial(k, j)*polylog(-j, I)*n^j for j in range(k+1)))
        return int(imag(p))
    for n in range(8): print([T(n, k) for k in range(7)])

Formula

A(n, k) = n^k*(GHZeta(k, n, 4) - GHZeta(k, n, 2)) where GHZeta(k, n, m) = m^(k+1) * HurwitzZeta(-k, 1/(m*n)) for n > 0, and T(0, k) = 1.
A(n, k) = Im(P(n, k)) where P(n, k) = 2*i*(1 + Sum_{j=0..k} binomial(k, j)*polylog(-j, i)*n^j).
A(n, k) = substitute(x = -n, P(k, 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).
Showing 1-3 of 3 results.