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

A003701 Expansion of e.g.f. exp(x)/cos(x).

Original entry on oeis.org

1, 1, 2, 4, 12, 36, 152, 624, 3472, 18256, 126752, 814144, 6781632, 51475776, 500231552, 4381112064, 48656756992, 482962852096, 6034272215552, 66942218896384, 929327412759552, 11394877025289216, 174008703107274752, 2336793875186479104, 38928735228629389312
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of A000364 (with interpolated zeros). Hankel transform is A055209. - Paul Barry, Jan 12 2009

Examples

			G.f. = 1 + x + 2*x^2 + 4*x^3 + 12*x^4 + 36*x^5 + 152*x^6 + 624*x^7 + 3472*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A000795 and A002084.

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(x)/Cos(x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Oct 14 2018
  • Maple
    G(x):= exp(x)*sec(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
    # second Maple program:
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    a:= n-> add(`if`(j::odd, 0, b(j, 0)*binomial(n, j)), j=0..n):
    seq(a(n), n=0..30);  # Alois P. Heinz, May 12 2024
  • Mathematica
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Exp[ x ] / Cos[x], {x, 0, n}]] (* Michael Somos, Jun 06 2012 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp(x)/cos(x))) \\ Joerg Arndt, May 07 2013
    

Formula

G.f.: 1/(1-x-x^2/(1-x-4x^2/(1-x-9x^2/(1-x-16x^2.... (continued fraction). - Paul Barry, Jan 12 2009
E.g.f.: exp(x)*sec(x). - Zerinvary Lajos, Apr 05 2009
E.g.f.: 1+x/H(0); H(k)=4k+1-x+x^2*(4k+1)/((2k+1)*(4k+3)-x^2+x*(2k+1)*(4k+3)/(2k+2-x+x*(2k+2)/H(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Nov 15 2011
G.f.: 1/G(0) where G(k)= 1 - 2*x*(k+1)/(1 + 1/(1 + 2*x*(k+1)/G(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 20 2012
G.f.: -1/x/Q(0), where Q(k)= 1 - 1/x - (k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 26 2013
G.f.: (1-x)/Q(0), where Q(k)= (1-x)^2 - (1-x)^2*x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 04 2013
a(n) ~ n! * ((-1)^n*exp(-Pi/2) + exp(Pi/2)) *(2/Pi)^(n+1). - Vaclav Kotesovec, Oct 08 2013
G.f.: Q(0), where Q(k) = 1 - x*(2*k+1)/( x*(2*k+1) - 1/(1 + x*(2*k+1)/( x*(2*k+1) + 1/(1 - x*(2*k+2)/( x*(2*k+2) - 1/(1 + x*(2*k+2)/( x*(2*k+2) + 1/Q(k+1) ))))))); (continued fraction). - Sergei N. Gladkovskii, Oct 22 2013
G.f.: Q(0)/(1-x), where Q(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 - (1-x)^2/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2013

Extensions

Extended and reformatted 03/97.

A062161 Boustrophedon transform of n mod 2.

Original entry on oeis.org

0, 1, 2, 4, 12, 36, 142, 624, 3192, 18256, 116282, 814144, 6219972, 51475776, 458790022, 4381112064, 44625674352, 482962852096, 5534347077362, 66942218896384, 852334810990332, 11394877025289216, 159592488559874302, 2336793875186479104, 35703580441464231912
Offset: 0

Views

Author

Frank Ellermann, Jun 10 2001

Keywords

Crossrefs

Programs

  • Haskell
    a062161 n = sum $ zipWith (*) (a109449_row n) $ cycle [0,1]
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Mathematica
    With[{nn=30},CoefficientList[Series[(Sec[x]+Tan[x])Sinh[x],{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Feb 16 2013 *)
  • Python
    from itertools import accumulate, islice
    def A062161_gen(): # generator of terms
        blist, m = tuple(), 1
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=(m := 1-m))))[-1]
    A062161_list = list(islice(A062161_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Generalized algorithm of L. Seidel (1877)
    def A062161_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
            # print [A[z] for z in (-i//2..i//2)]
            R.append(A[e*i//2])
        return R
    A062161_list(10) # Peter Luschny, Jun 02 2012
    

Formula

a(2n) = A009747(n), a(2n+1) = A002084(n).
E.g.f.: (sec(x)+tan(x))*sinh(x); a(n)=(A000667(n)-A062162(n))/2. - Paul Barry, Jan 21 2005
a(n) = Sum{k, k>=0} binomial(n, 2k+1)*A000111(n-2k-1). - Philippe Deléham, Aug 28 2005
a(n) = Sum_{k=0..n} A109449(n,k) * (k mod 2). - Reinhard Zumkeller, Nov 03 2013 [corrected by Jason Yuen, Jan 07 2025]

A000734 Boustrophedon transform of 1,1,2,4,8,16,32,...

Original entry on oeis.org

1, 2, 5, 15, 49, 177, 715, 3255, 16689, 95777, 609875, 4270695, 32624329, 269995377, 2406363835, 22979029335, 234062319969, 2533147494977, 29027730898595, 351112918079175, 4470508510495609, 59766296291090577
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of A062272. - Paul Barry, Jan 21 2005

Crossrefs

Programs

  • Haskell
    a000734 n = sum $ zipWith (*) (a109449_row n) (1 : a000079_list)
    -- Reinhard Zumkeller, Nov 04 2013
    
  • Mathematica
    CoefficientList[Series[(1+E^(2*x))*(Sec[x]+Tan[x])/2, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 07 2013 *)
    t[n_, 0] := If[n == 0, 1, 2^(n-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 *)
  • Python
    from itertools import count, accumulate, islice
    def A000734_gen(): # generator of terms
        yield 1
        blist, m = (1,), 1
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=m)))[-1]
            m *= 2
    A000734_list = list(islice(A000734_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000734_list(n) :
        A = {-1:0, 0:1}; R = []
        k = 0; e = 1; Bm = 1
        for i in range(n) :
            Am = Bm
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            Bm += Bm
            R.append(A[e*i//2]/2)
        return R
    A000734_list(22) # Peter Luschny, Jun 02 2012
    

Formula

E.g.f.: (1 + exp(2*x))*(sec(x) + tan(x))/2. - Paul Barry, Jan 21 2005
a(n) ~ n! * (1 + exp(Pi)) * (2/Pi)^(n+1). - Vaclav Kotesovec, Oct 07 2013

A003719 Expansion of tan(x)*cosh(x).

Original entry on oeis.org

1, 5, 41, 685, 19921, 887765, 56126201, 4776869245, 526589630881, 72989204937125, 12424192360405961, 2547879762929443405, 619570064016825283441, 176273806836039238900085, 58010159408189457446855321, 21864887814006548202566779165
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisection of A009739 and (apparently) A062272.

Programs

  • Mathematica
    nn = 20; Table[(CoefficientList[Series[Cosh[x]*Tan[x], {x, 0, 2*nn+1}], x] * Range[0, 2*nn+1]!)[[n]], {n, 2, 2*nn, 2}] (* Vaclav Kotesovec, Feb 16 2015 *)

Formula

a(n) = Sum_{k>=0} binomial(2n+1, 2k)*A000111(2n+1-2k). - Philippe Deléham, Aug 27 2005
a(n) ~ cosh(Pi/2) * (2*n+1)! * 2^(2*n+3) / Pi^(2*n+2). - Vaclav Kotesovec, Feb 16 2015

Extensions

Extended and formatted Mar 15 1997 by Olivier Gérard
Prior Mathematica program deleted by Harvey P. Dale, Nov 04 2019

A162170 Matrix inverse of A162169.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 0, 3, 1, 5, 0, 6, 0, 1, 16, 0, 20, 0, 5, 1, 61, 0, 75, 0, 15, 0, 1, 272, 0, 336, 0, 70, 0, 7, 1, 1385, 0, 1708, 0, 350, 0, 28, 0, 1, 7936, 0, 9792, 0, 2016, 0, 168, 0, 9, 1, 50521, 0, 62325, 0, 12810, 0, 1050, 0, 45, 0, 1, 353792, 0, 436480, 0, 89760, 0, 7392, 0
Offset: 1

Views

Author

Mats Granvik, Jun 27 2009

Keywords

Comments

First column appears to be A000111. Third column is A162171. Row sums minus A000035 appears to be A062272.
The above remarks are correct. - Peter Bala, Sep 08 2021

Examples

			Table begins:
   1
   1   1
   1   0   1
   2   0   3   1
   5   0   6   0   1
  16   0  20   0   5   1
  61   0  75   0  15   0   1
		

Crossrefs

Programs

  • Maple
    A000111 := n -> n!*coeff(series(sec(x) + tan(x), x, n+1), x, n):
    seq(seq(0^(n-k)*((1 - (-1)^k)*(1/2))*((1 - (-1)^n)*(1/2)) + ((1 + (-1)^k)*(1/2))*binomial(n, k)*A000111(n-k), k = 0..n), n = 0..11);  # Peter Bala, Sep 08 2021
  • PARI
    T(n, k) = if (k % 2, binomial(n-1, k-1) * (-1)^floor((n+k-1)/2), if (n==k, 1, 0));
    tabl(nn) = {m = matrix(nn, nn, n, k, if (n>=k, T(n,k), 0)); m = m^(-1); for (n=1, nn, for (k=1, n, print1(m[n,k], ", ");); print(););} \\ Michel Marcus, Jun 17 2015

Formula

From Peter Bala, Sep 08 2021: (Start)
Assuming an offset of 0: T(2*n+1,2*n+1) = 1 for n >= 0 else otherwise T(n,k) = (1 + (-1)^k)/2*binomial(n,k)*A000111(n-k).
E.g.f.: (sec(x) + tan(x))*cosh(t*x) + sinh(t*x) = 1 + (1 + t)*x + (1 + t^2)*x^2/2! + (2 + 3*t^2 + t^3)*x^3/3! + .... (End)

A097953 Boustrophedon transform of ((-2)^n+0^n)/2.

Original entry on oeis.org

1, 0, 1, 1, 1, 15, 11, 201, 561, 4575, 25171, 187801, 1400521, 11694735, 103903931, 993285801, 10113814881, 109470594495, 1254389104291, 15173016742201, 193187969483641, 2582736821247855, 36172850924874251
Offset: 0

Views

Author

Paul Barry, Jan 21 2005

Keywords

Comments

Inverse binomial transform of A062272.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+1/E^(2*x))*(1+Sin[x])/Cos[x]/2, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Sep 29 2013 *)
  • Python
    from itertools import islice, accumulate
    def A097953_gen(): # generator of terms
        blist, m = tuple(), 1
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=(m+1)//2)))[-1]
            m *= -2
    A097953_list = list(islice(A097953_gen(),20)) # Chai Wah Wu, Jun 11 2022

Formula

E.g.f.: (1+exp(-2x))(sec(x)+tan(x))/2.
a(n) ~ n! * (1+exp(-Pi)) * (2/Pi)^(n+1). - Vaclav Kotesovec, Sep 29 2013

A352906 Expansion of e.g.f. sinh(x) / (1 - sin(x)).

Original entry on oeis.org

0, 1, 2, 7, 24, 101, 472, 2507, 14784, 96361, 687392, 5332207, 44694144, 402663821, 3880880512, 39848805107, 434306095104, 5007757446481, 60907946680832, 779345606053207, 10465549612529664, 147168296199468341, 2162785172079204352, 33155700678534788507, 529311396083558989824
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 07 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 24; CoefficientList[Series[Sinh[x]/(1 - Sin[x]), {x, 0, nmax}], x] Range[0, nmax]!

Formula

a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n,2*k+1) * A000111(n-2*k).
a(n) ~ sinh(Pi/2) * 2^(n + 7/2) * n^(n + 3/2) / (exp(n) * Pi^(n + 3/2)). - Vaclav Kotesovec, Apr 07 2022
Showing 1-8 of 8 results.