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

A109449 Triangle read by rows, T(n,k) = binomial(n,k)*A000111(n-k), 0 <= k <= n.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Aug 27 2005

Keywords

Comments

The boustrophedon transform {t} of a sequence {s} is given by t_n = Sum_{k=0..n} T(n,k)*s(k). Triangle may be called the boustrophedon triangle.
The 'signed version' of the triangle is the exponential Riordan array [sech(x) + tanh(x), x]. - Peter Luschny, Jan 24 2009
Up to signs, the matrix is self-inverse: T^(-1)(n,k) = (-1)^(n+k)*T(n,k). - R. J. Mathar, Mar 15 2013

Examples

			Triangle starts:
      1;
      1,     1;
      1,     2,     1;
      2,     3,     3,     1;
      5,     8,     6,     4,     1;
     16,    25,    20,    10,     5,    1;
     61,    96,    75,    40,    15,    6,    1;
    272,   427,   336,   175,    70,   21,    7,   1;
   1385,  2176,  1708,   896,   350,  112,   28,   8,  1;
   7936, 12465,  9792,  5124,  2016,  630,  168,  36,  9,  1;
  50521, 79360, 62325, 32640, 12810, 4032, 1050, 240, 45, 10, 1; ...
		

Crossrefs

Programs

  • Haskell
    a109449 n k = a109449_row n !! k
    a109449_row n = zipWith (*)
                    (a007318_row n) (reverse $ take (n + 1) a000111_list)
    a109449_tabl = map a109449_row [0..]
    -- Reinhard Zumkeller, Nov 02 2013
    
  • Magma
    f:= func< n,x | Evaluate(BernoulliPolynomial(n+1), x) >;
    A109449:= func< n,k | k eq n select 1 else 2^(2*n-2*k+1)*Binomial(n,k)*Abs(f(n-k,3/4) - f(n-k,1/4) + f(n-k,1) - f(n-k,1/2))/(n-k+1) >;
    [A109449(n,k): k in [0..n], n in [0..13]]; // G. C. Greubel, Jul 10 2025
  • Maple
    From Peter Luschny, Jul 10 2009, edited Jun 06 2022: (Start)
    A109449 := (n,k) -> binomial(n, k)*A000111(n-k):
    seq(print(seq(A109449(n, k), k=0..n)), n=0..9);
    B109449 := (n,k) -> 2^(n-k)*binomial(n, k)*abs(euler(n-k, 1/2)+euler(n-k, 1)) -`if`(n-k=0, 1, 0): seq(print(seq(B109449(n, k), k=0..n)), n=0..9);
    R109449 := proc(n, k) option remember; if k = 0 then A000111(n) else R109449(n-1, k-1)*n/k fi end: seq(print(seq(R109449(n, k), k=0..n)), n=0..9);
    E109449 := proc(n) add(binomial(n, k)*euler(k)*((x+1)^(n-k)+ x^(n-k)), k=0..n) -x^n end: seq(print(seq(abs(coeff(E109449(n), x, k)), k=0..n)), n=0..9);
    sigma := n -> ifelse(n=0, 1, [1,1,0,-1,-1,-1,0,1][n mod 8 + 1]/2^iquo(n-1,2)-1):
    L109449 := proc(n) add(add((-1)^v*binomial(k, v)*(x+v+1)^n*sigma(k), v=0..k), k=0..n) end: seq(print(seq(abs(coeff(L109449(n), x, k)), k=0..n)), n=0..9);
    X109449 := n -> n!*coeff(series(exp(x*t)*(sech(t)+tanh(t)), t, 24), t, n): seq(print(seq(abs(coeff(X109449(n), x, k)), k=0..n)), n=0..9);
    (End)
  • Mathematica
    lim = 10; s = CoefficientList[Series[(1 + Sin[x])/Cos[x], {x, 0, lim}], x] Table[k!, {k, 0, lim}]; Table[Binomial[n, k] s[[n - k + 1]], {n, 0, lim}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 24 2015, after Jean-François Alcover at A000111 *)
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 27 2019 *)
  • PARI
    A109449(n,k)=binomial(n,k)*if(n>k,2*abs(polylog(k-n,I)),1) \\ M. F. Hasler, Oct 05 2017
    
  • Sage
    R = PolynomialRing(ZZ, 'x')
    @CachedFunction
    def skp(n, x) :
        if n == 0 : return 1
        return add(skp(k, 0)*binomial(n, k)*(x^(n-k)-(n+1)%2) for k in range(n)[::2])
    def A109449_row(n):
        x = R.gen()
        return [abs(c) for c in list(skp(n,x)-skp(n,x-1)+x^n)]
    for n in (0..10) : print(A109449_row(n)) # Peter Luschny, Jul 22 2012
    

Formula

Sum_{k>=0} T(n, k) = A000667(n).
Sum_{k>=0} T(2n, 2k) = A000795(n).
Sum_{k>=0} T(2n, 2k+1) = A009747(n).
Sum_{k>=0} T(2n+1, 2k) = A003719(n).
Sum_{k>=0} T(2n+1, 2k+1) = A002084(n).
Sum_{k>=0} T(n, 2k) = A062272(n).
Sum_{k>=0} T(n, 2k+1) = A062161(n).
Sum_{k>=0} (-1)^(k)*T(n, k) = A062162(n). - Johannes W. Meijer, Apr 20 2011
E.g.f.: exp(x*y)*(sec(x)+tan(x)). - Vladeta Jovovic, May 20 2007
T(n,k) = 2^(n-k)*C(n,k)*|E(n-k,1/2) + E(n-k,1)| - [n=k] where C(n,k) is the binomial coefficient, E(m,x) are the Euler polynomials and [] the Iverson bracket. - Peter Luschny, Jan 24 2009
From Reikku Kulon, Feb 26 2009: (Start)
A109449(n, 0) = A000111(n), approx. round(2^(n + 2) * n! / Pi^(n + 1)).
A109449(n, n - 1) = n.
A109449(n, n) = 1.
For n > 0, k > 0: A109449(n, k) = A109449(n - 1, k - 1) * n / k. (End)
From Peter Luschny, Jul 10 2009: (Start)
Let p_n(x) = Sum_{k=0..n} Sum_{v=0..k} (-1)^v C(k,v)*F(k)*(x+v+1)^n, where F(0)=1 and for k>0 F(k)=-1 + s_k 2^floor((k-1)/2), s_k is 0 if k mod 8 in {2,6}, 1 if k mod 8 in {0,1,7} and otherwise -1. T(n,k) are the absolute values of the coefficients of these polynomials.
Another way to express the polynomials p_n(x) is
p_n(x) = -x^n + Sum_{k=0..n} binomial(n,k)*Euler(k)((x+1)^(n-k) + x^(n-k)). (End)
From Peter Bala, Jan 26 2011: (Start)
An explicit formula for the n-th row polynomial is
x^n + i*Sum_{k=1..n}((1+i)/2)^(k-1)*Sum_{j=0..k} (-1)^j*binomial(k,j)*(x+i*j)^n, where i = sqrt(-1). This is the triangle of connection constants between the polynomial sequences {Z(n,x+1)} and {Z(n,x)}, where Z(n,x) denotes the zigzag polynomials described in A147309.
Denote the present array by M. The first column of the array (I-x*M)^-1 is a sequence of rational functions in x whose numerator polynomials are the row polynomials of A145876 - the generalized Eulerian numbers associated with the zigzag numbers. (End)
Let skp{n}(x) denote the Swiss-Knife polynomials A153641. Then
T(n,k) = [x^(n-k)] |skp{n}(x) - skp{n}(x-1) + x^n|. - Peter Luschny, Jul 22 2012
T(n,k) = A007318(n,k) * A000111(n - k), k = 0..n. - Reinhard Zumkeller, Nov 02 2013
T(n,k) = abs(A247453(n,k)). - Reinhard Zumkeller, Sep 17 2014

Extensions

Edited, formula corrected, typo T(9,4)=2016 (before 2816) fixed by Peter Luschny, Jul 10 2009

A119879 Exponential Riordan array (sech(x),x).

Original entry on oeis.org

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

Views

Author

Paul Barry, May 26 2006

Keywords

Comments

Row sums have e.g.f. exp(x)*sech(x) (signed version of A009006). Inverse of masked Pascal triangle A119467. Transforms the sequence with e.g.f. g(x) to the sequence with e.g.f. g(x)*sech(x).
Coefficients of the Swiss-Knife polynomials for the computation of Euler, tangent and Bernoulli number (triangle read by rows). Another version in A153641. - Philippe Deléham, Oct 26 2013
Relations to Green functions and raising/creation and lowering/annihilation/destruction operators are presented in Hodges and Sukumar and in Copeland's discussion of this sequence and 2020 pdf. - Tom Copeland, Jul 24 2020

Examples

			Triangle begins:
     1;
     0,    1;
    -1,    0,     1;
     0,   -3,     0,   1;
     5,    0,    -6,   0,   1;
     0,   25,     0, -10,   0,   1;
   -61,    0,    75,   0, -15,   0,   1;
     0, -427,     0, 175,   0, -21,   0,  1;
  1385,    0, -1708,   0, 350,   0, -28,  0,  1;
		

Crossrefs

Row sums are A155585. - Johannes W. Meijer, Apr 20 2011
Rows reversed: A081658.

Programs

  • Maple
    T := (n,k) -> binomial(n,k)*2^(n-k)*euler(n-k,1/2): # Peter Luschny, Jan 25 2009
  • Mathematica
    T[n_, k_] := Binomial[n, k] 2^(n-k) EulerE[n-k, 1/2];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 20 2018, after Peter Luschny *)
  • PARI
    {T(n,k) = binomial(n,k)*2^(n-k)*(2/(n-k+1))*(subst(bernpol(n-k+1, x), x, 1/2) - 2^(n-k+1)*subst(bernpol(n-k+1, x), x, 1/4))};
    for(n=0,5, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 25 2019
  • Sage
    @CachedFunction
    def A119879_poly(n, x) :
        return 1 if n == 0  else add(A119879_poly(k, 0)*binomial(n, k)*(x^(n-k)-1+n%2) for k in range(n)[::2])
    def A119879_row(n) :
        R = PolynomialRing(ZZ, 'x')
        return R(A119879_poly(n,x)).coeffs()  # Peter Luschny, Jul 16 2012
    # Alternatively:
    
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(sech(x), x, 9, exp=true) # Peter Luschny, Apr 19 2015
    

Formula

Number triangle whose k-th column has e.g.f. sech(x)*x^k/k!.
T(n,k) = C(n,k)*2^(n-k)*E_{n-k}(1/2) where C(n,k) is the binomial coefficient and E_{m}(x) are the Euler polynomials. - Peter Luschny, Jan 25 2009
The coefficients in ascending order of x^i of the polynomials p{0}(x) = 1 and p{n}(x) = Sum_{k=0..n-1; k even} binomial(n,k)*p{k}(0)*((n mod 2) - 1 + x^(n-k)). - Peter Luschny, Jul 16 2012
E.g.f.: exp(x*z)/cosh(x). - Peter Luschny, Aug 01 2012
Sum_{k=0..n} T(n,k)*x^k = A122045(n), A155585(n), A119880(n), A119881(n) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Oct 27 2013
With all offsets 0, let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of A123125. Then the row polynomials of A046802 (the h-polynomials of the stellahedra) are given by h_n(x) = A_n(x;1); the row polynomials of A248727 (the face polynomials of the stellahedra), by f_n(x) = A_n(1 + x;1); the Swiss-knife polynomials of this entry, A119879, by Sw_n(x) = A_n(-1;1 + x); and the row polynomials of the Worpitsky triangle (A130850), by w_n(x) = A(1 + x;0). Other specializations of A_n(x;y) give A090582 (the f-polynomials of the permutohedra, cf. also A019538) and A028246 (another version of the Worpitsky triangle). - Tom Copeland, Jan 24 2020
Triangle equals P*((I + P^2)/2)^(-1), where P denotes Pascal's triangle A007318. - Peter Bala, Mar 07 2024

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

A214447 a(n) = (-2)^n * Euler_polynomial(n,1) * binomial(2*n,n).

Original entry on oeis.org

1, -2, 0, 40, 0, -4032, 0, 933504, 0, -385848320, 0, 249576198144, 0, -232643283353600, 0, 295306112919306240, 0, -489743069731226910720, 0, 1028154317960939805081600, 0, -2665182817368374114506506240, 0, 8360422228704533182913131315200
Offset: 0

Views

Author

Peter Luschny, Jul 18 2012

Keywords

Comments

Central column of the Euler tangent triangle, a(n) = A081733(2*n,n).
Also a(n) = -A162660(2*n,n) for n > 0. - Peter Luschny, Jul 23 2012

Crossrefs

Programs

  • Maple
    A214447 := n -> binomial(2*n,n)*(-2)^n*euler(n,1):
    seq(A214447(n), n=0..23);
  • Sage
    from mpmath import mp, fac2
    mp.dps = 32
    def A214447(n) : return (n+1)*2^n*fac2(2*n-1)*add(add((-1)^(k-j)*(k-j)^n / (factorial(j)*factorial(n-j+1)) for j in (0..k)) for k in (1..n))
    print([int(A214447(n)) for n in (0..19)]) # Peter Luschny, Jul 23 2012

Formula

a(n) = [x^n] (skp(2*n,x+1)-skp(2*n,x-1))/2 where skp(n,x) are the Swiss-Knife polynomials A153641.
a(n) = (n+1)*2^n*(2*n-1)!!*Sum_{k=1..n} Sum_{j=0..k} (-1)^(k-j)*(k-j)^n/(j!*(n-j+1)!) for n > 0. - Peter Luschny, Jul 23 2012

A213736 Triangle read by rows, coefficients of the Swiss-Knife median polynomials M_{n}(x) in descending order of powers.

Original entry on oeis.org

1, 1, -1, -1, 1, -2, -5, 6, 4, 1, -3, -12, 29, 57, -72, -46, 1, -4, -22, 80, 261, -660, -1264, 1608, 1024, 1, -5, -35, 170, 775, -2941, -9385, 23880, 45620, -58080, -36976, 1, -6, -51, 310, 1815, -9186, -41033, 156618, 498660, -1269720, -2425056, 3087648
Offset: 0

Views

Author

Peter Luschny, Jun 19 2012

Keywords

Comments

M(n,0) = M(n,1) = A099023(n) = (-1)^n*A000657(n).

Examples

			M(0,x) = 1,
M(1,x) = x^2-x-1,
M(2,x) = x^4-2*x^3-5*x^2+6*x+4,
M(3,x) = x^6-3*x^5-12*x^4+29*x^3+57*x^2-72*x-46.
		

Crossrefs

Programs

  • Maple
    A213736_triangle := proc(n) local A, len, k, m, sk_poly;
    len := 2*n-1; A := array(0..len,0..len);
    sk_poly := proc(n, x) local v, k;
    add(`if`((k+1)mod 4 = 0,0,(-1)^iquo(k+1,4))*2^iquo(-k,2)*
    add((-1)^v*binomial(k,v)*(v+x+1)^n,v=0..k),k=0..n) end:
    for m from 0 to len do A[m,0] := sk_poly(m,x);
       for k from m-1 by -1 to 0 do
           A[k,m-k] := A[k+1,m-k-1] - A[k,m-k-1] od od;
    seq(print(seq(coeff(A[k,k],x,2*k-i),i=0..2*k)),k=0..n-1) end:
    A213736_triangle(5);

A326325 a(n) = 2^n*n!*([z^n] exp(x*z)*tanh(z))(1/2).

Original entry on oeis.org

0, 2, 4, -10, -56, 362, 2764, -24610, -250736, 2873042, 36581524, -512343610, -7828053416, 129570724922, 2309644635484, -44110959165010, -898621108880096, 19450718635716002, 445777636063460644, -10784052561125704810, -274613643571568682776, 7342627959965776406282
Offset: 0

Views

Author

Peter Luschny, Jun 28 2019

Keywords

Crossrefs

Programs

  • Maple
    seq(1 - 4^n*euler(n, 1/4), n=0..21);
  • Mathematica
    p := CoefficientList[Series[Exp[x z] Tanh[z], {z, 0, 21}], z];
    norm := Table[2^n n!, {n, 0, 21}]; norm  (p /. x -> 1/2)

Formula

a(n) = 1 - 4^n*Euler(n, 1/4).
Let p(n, x) = -x^n + Sum_{k=0..n} binomial(n,k)*Euler(k)*(x+1)^(n-k) (the polynomials defined in A162660), then a(n) = 2^n*p(n, 1/2).
Showing 1-6 of 6 results.