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

A000667 Boustrophedon transform of all-1's sequence.

Original entry on oeis.org

1, 2, 4, 9, 24, 77, 294, 1309, 6664, 38177, 243034, 1701909, 13001604, 107601977, 959021574, 9157981309, 93282431344, 1009552482977, 11568619292914, 139931423833509, 1781662223749884, 23819069385695177, 333601191667149054, 4884673638115922509
Offset: 0

Views

Author

Keywords

Comments

Fill in a triangle, like Pascal's triangle, beginning each row with a 1 and filling in rows alternately right to left and left to right.
Row sums of triangle A109449. - Reinhard Zumkeller, Nov 04 2013

Examples

			...............1..............
............1..->..2..........
.........4..<-.3...<-..1......
......1..->.5..->..8...->..9..
		

Crossrefs

Absolute value of pairwise sums of A009337.
Column k=1 of A292975.

Programs

  • Haskell
    a000667 n = if x == 1 then last xs else x
                where xs@(x:_) = a227862_row n
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Mathematica
    With[{nn=30},CoefficientList[Series[Exp[x](Tan[x]+Sec[x]),{x,0,nn}], x]Range[0,nn]!] (* Harvey P. Dale, Nov 28 2011 *)
    t[, 0] = 1; 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 *)
  • PARI
    x='x+O('x^33); Vec(serlaplace( exp(x)*(tan(x) + 1/cos(x)) ) ) \\ Joerg Arndt, Jul 30 2016
    
  • Python
    from itertools import islice, accumulate
    def A000667_gen(): # generator of terms
        blist = tuple()
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=1)))[-1]
    A000667_list = list(islice(A000667_gen(),20)) # Chai Wah Wu, Jun 11 2022
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000667_list(n) :
        R = []; A = {-1:0, 0:0}
        k = 0; e = 1
        for i in range(n) :
            Am = 1
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            # print [A[z] for z in (-i//2..i//2)]
            R.append(A[e*i//2])
        return R
    A000667_list(10)  # Peter Luschny, Jun 02 2012
    

Formula

E.g.f.: exp(x) * (tan(x) + sec(x)).
Limit_{n->infinity} 2*n*a(n-1)/a(n) = Pi; lim_{n->infinity} a(n)*a(n-2)/a(n-1)^2 = 1 + 1/(n-1). - Gerald McGarvey, Aug 13 2004
a(n) = Sum_{k=0..n} binomial(n, k)*A000111(n-k). a(2*n) = A000795(n) + A009747(n), a(2*n+1) = A002084(n) + A003719(n). - Philippe Deléham, Aug 28 2005
a(n) = A227862(n, n * (n mod 2)). - Reinhard Zumkeller, Nov 01 2013
G.f.: E(0)*x/(1-x)/(1-2*x) + 1/(1-x), where E(k) = 1 - x^2*(k + 1)*(k + 2)/(x^2*(k + 1)*(k + 2) - 2*(x*(k + 2) - 1)*(x*(k + 3) - 1)/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 16 2014
a(n) ~ n! * exp(Pi/2) * 2^(n+2) / Pi^(n+1). - Vaclav Kotesovec, Jun 12 2015

A009739 E.g.f. tan(x)*exp(x).

Original entry on oeis.org

0, 1, 2, 5, 12, 41, 142, 685, 3192, 19921, 116282, 887765, 6219972, 56126201, 458790022, 4776869245, 44625674352, 526589630881, 5534347077362, 72989204937125, 852334810990332, 12424192360405961, 159592488559874302, 2547879762929443405, 35703580441464231912
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A003701.

Programs

  • Maple
    G(x):=exp(x)*tan(x): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..22 ); # Zerinvary Lajos, Apr 05 2009
    # Alternative:
    S:= series(exp(x)*tan(x),x, 51):
    seq(coeff(S,x,j)*j!,j=0..50); # Robert Israel, Sep 22 2019
  • PARI
    x='x+O('x^66); concat([0],Vec(serlaplace(tan(x)*exp(x)))) \\ Joerg Arndt, Apr 26 2013

Formula

a(2n) = A009747(n), a(2n+1) = A003719(n).
E.g.f.: exp(x)*tan(x). - Zerinvary Lajos, Apr 05 2009
G.f.: 1/(x-1)/Q(0), where Q(k)= 1 - 1/x - (k+1)*(k+2)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 26 2013
G.f.: x/(1-x)/Q(0), where Q(k)= 1 - x - x^2*(k+1)*(k+2)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 26 2013
G.f.: G(0)*x/(1-x)^2, where G(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - (1-x)^2/G(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 23 2014
a(n) ~ 2^(3/2 + n)*(exp(Pi) - (-1)^n)*exp(-Pi/2 - n)*Pi^(-1/2 - n)*n^(1/2 + n). - Robert Israel, Sep 22 2019

Extensions

Extended and signs tested by Olivier Gérard, Mar 15 1997

A062272 Boustrophedon transform of (n+1) mod 2.

Original entry on oeis.org

1, 1, 2, 5, 12, 41, 152, 685, 3472, 19921, 126752, 887765, 6781632, 56126201, 500231552, 4776869245, 48656756992, 526589630881, 6034272215552, 72989204937125, 929327412759552, 12424192360405961, 174008703107274752
Offset: 0

Views

Author

Frank Ellermann, Jun 16 2001

Keywords

Crossrefs

A000734 (binomial transform), a(2n+1)= A003719(n), a(2n)= A000795(n),
Cf. A062161 (n mod 2).
Row sums of A162170 minus A000035. - Mats Granvik, Jun 27 2009
Cf. A059841.

Programs

  • Haskell
    a062272 n = sum $ zipWith (*) (a109449_row n) $ cycle [1,0]
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Mathematica
    s[n_] = Mod[n+1, 2]; t[n_, 0] := s[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 accumulate, islice
    def A062272_gen(): # generator of terms
        blist, m = tuple(), 0
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=(m := 1-m))))[-1]
    A062272_list = list(islice(A062272_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Generalized algorithm of L. Seidel (1877)
    def A062272_list(n) :
        R = []; A = {-1:0, 0:0}
        k = 0; e = 1
        for i in range(n) :
            Am = 1 if e == 1 else 0
            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
    A062272_list(10) # Peter Luschny, Jun 02 2012
    

Formula

E.g.f.: (sec(x)+tan(x))cosh(x); a(n)=(A000667(n)+A062162(n))/2. - Paul Barry, Jan 21 2005
a(n) = Sum{k, k>=0} binomial(n, 2k)*A000111(n-2k). - Philippe Deléham, Aug 28 2005
a(n) = sum(A109449(n,k) * (1 - n mod 2): k=0..n). - Reinhard Zumkeller, Nov 03 2013
Showing 1-4 of 4 results.