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-5 of 5 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

A062162 Boustrophedon transform of (-1)^n.

Original entry on oeis.org

1, 0, 0, 1, 0, 5, 10, 61, 280, 1665, 10470, 73621, 561660, 4650425, 41441530, 395757181, 4031082640, 43626778785, 499925138190, 6046986040741, 76992601769220, 1029315335116745, 14416214547400450, 211085887742964301, 3225154787165157400, 51329932704636904305
Offset: 0

Views

Author

Frank Ellermann, Jun 10 2001

Keywords

Comments

Inverse binomial transform of Euler numbers A000111. - Paul Barry, Jan 21 2005
a(n) = abs(sum of row n in A247453). - Reinhard Zumkeller, Sep 17 2014

Crossrefs

Cf. A000111 (binomial transform).
Cf. A000667.
Cf. A247453.

Programs

  • Haskell
    a062162 = abs . sum . a247453_row -- Reinhard Zumkeller, Sep 17 2014
    
  • Mathematica
    CoefficientList[Series[E^(-x)*(Tan[x]+1/Cos[x]), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 05 2013 *)
    t[n_, 0] := (-1)^n; t[n_, k_] := t[n, k] = t[n, k-1] + t[n-1, n-k]; a[n_] := t[n, n]; Array[a, 30, 0] (* Jean-François Alcover, Feb 12 2016 *)
  • Python
    from itertools import islice, accumulate
    def A062162_gen(): # generator of terms
        blist, m = tuple(), -1
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=(m:=-m))))[-1]
    A062162_list = list(islice(A062162_gen(),20)) # Chai Wah Wu, Jun 10 2022
  • Sage
    # Generalized algorithm of L. Seidel (1877)
    def A062162_list(n) :
        R = []; A = {-1:0, 0:0}
        k = 0; e = 1
        for i in range(n) :
            Am = (-1)^i
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            R.append(A[e*i//2])
        return R
    A062162_list(22) # Peter Luschny, Jun 02 2012
    

Formula

E.g.f.: exp(-x)*(tan(x) + sec(x)). - Vladeta Jovovic, Feb 11 2003
a(n) ~ 4*(2*n/Pi)^(n+1/2)/exp(n+Pi/2). - Vaclav Kotesovec, Oct 05 2013
G.f.: E(0)*x/(1+x) + 1/(1+x), where E(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 2*(x*k-1)*(x*(k+1)-1)/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 16 2014

A294033 Triangle read by rows, expansion of exp(x*z)*z*(tanh(z) + sech(z)), T(n, k) for n >= 1 and 0 <= k <= n-1.

Original entry on oeis.org

1, 2, 2, -3, 6, 3, -8, -12, 12, 4, 25, -40, -30, 20, 5, 96, 150, -120, -60, 30, 6, -427, 672, 525, -280, -105, 42, 7, -2176, -3416, 2688, 1400, -560, -168, 56, 8, 12465, -19584, -15372, 8064, 3150, -1008, -252, 72, 9, 79360, 124650, -97920, -51240, 20160, 6300, -1680, -360, 90, 10, -555731, 872960, 685575, -359040, -140910, 44352, 11550, -2640, -495, 110, 11
Offset: 1

Views

Author

Peter Luschny, Oct 24 2017

Keywords

Examples

			Triangle starts:
  [1][   1]
  [2][   2,   2]
  [3][  -3,   6,    3]
  [4][  -8, -12,   12,    4]
  [5][  25, -40,  -30,   20,    5]
  [6][  96, 150, -120,  -60,   30,  6]
  [7][-427, 672,  525, -280, -105, 42, 7]
		

Crossrefs

T(n, 0) = signed A065619. Row sums of abs(T(n,k)) = A231179.
A003506 (m=1), this seq. (m=2), A294034 (m=3).

Programs

  • Maple
    gf := exp(x*z)*z*(tanh(z)+sech(z)):
    s := n -> n!*coeff(series(gf,z,n+2),z,n):
    C := n -> PolynomialTools:-CoefficientList(s(n),x):
    ListTools:-FlattenOnce([seq(C(n), n=1..7)]);
    # Alternatively:
    T := (n, k) -> `if`(n = k+1, n,
    (k+1)*binomial(n,k+1)*2^(n-k-1)*(euler(n-k-1, 1/2)+euler(n-k-1, 1))):
    for n from 1 to 7 do seq(T(n,k), k=0..n-1) od;
  • Mathematica
    L[0] := 1; L[n_] := (-1)^Binomial[n, 2] 2 Abs[PolyLog[-n, -I]];
    p[n_] := n Sum[Binomial[n - 1, k - 1] L[k - 1] x^(n - k), {k, 0, n}];
    Table[CoefficientList[p[n], x], {n, 1, 11}] // Flatten

Formula

T(n, k) = (k+1)*binomial(n,k+1)*2^(n-k-1)*(Euler(n-k-1, 1/2) + Euler(n-k-1, 1)) for 0 <= k <= n-2.
T(n, k) is the coefficient of x^k of the polynomial p(n) = n*Sum_{k=1..n} binomial(n-1, k-1)*L(k-1)*x^(n-k) and L(n) = (-1)^binomial(n,2)*A000111(n). In particular n divides T(n, k).

A333303 T(n, k) = [x^k] (-2)^n*(B(n, x/2) - B(n, (x+1)/2)) where B(n, x) are the Bernoulli polynomials. Triangle read by rows, for 0 <= k <= n.

Original entry on oeis.org

0, 1, 1, -2, 0, -3, 3, -1, 0, 6, -4, 0, 5, 0, -10, 5, 3, 0, -15, 0, 15, -6, 0, -21, 0, 35, 0, -21, 7, -17, 0, 84, 0, -70, 0, 28, -8, 0, 153, 0, -252, 0, 126, 0, -36, 9, 155, 0, -765, 0, 630, 0, -210, 0, 45, -10, 0, -1705, 0, 2805, 0, -1386, 0, 330, 0, -55, 11
Offset: 0

Views

Author

Peter Luschny, May 07 2020

Keywords

Comments

Can be seen as the Bernoulli counterpart of the Euler triangles A247453 and A109449.

Examples

			B*(8, z) = 1024*(Zeta(-7, (z+1)/2) - Zeta(-7, z/2))
         = -17 + 84*z^2 - 70*z^4 + 28*z^6 - 8*z^7.
Triangle starts:
[ 0] [  0]
[ 1] [  1]
[ 2] [  1,    -2]
[ 3] [  0,    -3,    3]
[ 4] [ -1,     0,    6,   -4]
[ 5] [  0,     5,    0,  -10,   5]
[ 6] [  3,     0,  -15,    0,  15,    -6]
[ 7] [  0,   -21,    0,   35,   0,   -21,    7]
[ 8] [-17,     0,   84,    0, -70,     0,   28,  -8]
[ 9] [  0,   153,    0, -252,   0,   126,    0, -36,  9]
[10] [155,     0, -765,    0, 630,     0, -210,   0, 45, -10]
[11] [  0, -1705,    0, 2805,   0, -1386,    0, 330,  0, -55, 11]
		

Crossrefs

Row sums are (-1)^n*A226158(n). Alternating row sums are A239977(n).
Cf. A181983, A247453, A109449, (A053382/A053383) Bernoulli polynomials.

Programs

  • Mathematica
    B[n_, x_] := (-2)^n (BernoulliB[n, x/2] - BernoulliB[n, (x + 1)/2]);
    Prepend[Table[CoefficientList[B[n, x], x], {n, 1, 11}], 0] // Flatten
  • SageMath
    def Bstar(n,x):
        return (-2)^n*(bernoulli_polynomial(x/2,n) - bernoulli_polynomial((x+1)/2,n))
    print(flatten([expand(Bstar(n, x)).list() for n in (0..11)]))

Formula

Let B*(n, x) denote the alternating Bernoulli rational polynomial functions defined by Z*(s, x) = Phi(-1, s, x) and B*(s, x) = -s Z*(1 - s, x). Here Phi(z, s, x) is the Hurwitz-Lerch transcendent defined as an analytic continuation of Sum_{k>=0} z^k/(k+x)^s. Then T(n, k) = (-1)^n [x^k] 2 B*(n, x).
T(n, 0) = 2*(2^n - 1)*Bernoulli(n, 1) = n*Euler(n - 1, 1) = -A226158(n).
Main diagonal is (-1)^(n+1)*n = A181983(n).

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
Showing 1-5 of 5 results.