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.

A163770 Triangle read by rows interpolating the swinging subfactorial (A163650) with the swinging factorial (A056040).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 4, 6, -9, -7, -4, 0, 6, 44, 35, 28, 24, 24, 30, -165, -121, -86, -58, -34, -10, 20, 594, 429, 308, 222, 164, 130, 120, 140, -2037, -1443, -1014, -706, -484, -320, -190, -70, 70, 6824, 4787, 3344, 2330, 1624, 1140, 820, 630, 560, 630
Offset: 0

Views

Author

Peter Luschny, Aug 05 2009

Keywords

Comments

An analog to the derangement triangle (A068106).

Examples

			1
0, 1
1, 1, 2
2, 3, 4, 6
-9, -7, -4, 0, 6
44, 35, 28, 24, 24, 30
-165, -121, -86, -58, -34, -10, 20
		

Crossrefs

Row sums are A163773.

Programs

  • Maple
    DiffTria := proc(f,n,display) local m,A,j,i,T; T:=f(0);
    for m from 0 by 1 to n-1 do A[m] := f(m);
    for j from m by -1 to 1 do A[j-1] := A[j-1] - A[j] od;
    for i from 0 to m do T := T,(-1)^(m-i)*A[i] od;
    if display then print(seq(T[i],i=nops([T])-m..nops([T]))) fi;
    od; subsop(1=NULL,[T]) end:
    swing := proc(n) option remember; if n = 0 then 1 elif
    irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    Computes n rows of the triangle.
    A163770 := n -> DiffTria(k->swing(k),n,true);
    A068106 := n -> DiffTria(k->factorial(k),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[(-1)^(n - i)*Binomial[n - k, n - i]*sf[i], {i, k, n}]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,n-i)*i$ where i$ denotes the swinging factorial of i (A056040).

A163771 Triangle interpolating the swinging factorial (A056040) restricted to even indices with its binomial inverse. Same as interpolating the central trinomial coefficients (A002426) with the central binomial coefficients (A000984).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 10, 14, 20, 19, 26, 36, 50, 70, 51, 70, 96, 132, 182, 252, 141, 192, 262, 358, 490, 672, 924, 393, 534, 726, 988, 1346, 1836, 2508, 3432, 1107, 1500, 2034, 2760, 3748, 5094, 6930, 9438, 12870
Offset: 0

Views

Author

Peter Luschny, Aug 05 2009

Keywords

Comments

Triangle read by rows. For n >= 0, k >= 0 let T(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,n-i)*(2i)$ where i$ denotes the swinging factorial of i (A056040).
This is also the square array of central binomial coefficients A000984 in column 0 and higher (first: A051924, second, etc.) differences in subsequent columns, read by antidiagonals. - M. F. Hasler, Nov 15 2019

Examples

			Triangle begins
    1;
    1,   2;
    3,   4,   6;
    7,  10,  14,  20;
   19,  26,  36,  50,  70;
   51,  70,  96, 132, 182, 252;
  141, 192, 262, 358, 490, 672, 924;
From _M. F. Hasler_, Nov 15 2019: (Start)
The square array having central binomial coefficients A000984 in column 0 and higher differences in subsequent columns (col. 1 = A051924) starts:
     1   1    3    7    19    51 ...
     2   4   10   26    70   192 ...
     6  14   36   96   262   726 ...
    20  50  132  358   988  2760 ...
    70 182  490 1346  3748 10540 ...
   252 672 1836 5094 14288 40404 ...
  (...)
Read by falling antidiagonals this yields the same sequence. (End)
		

Crossrefs

Programs

  • Maple
    For the functions 'DiffTria' and 'swing' see A163770. Computes n rows of the triangle.
    a := n -> DiffTria(k->swing(2*k),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[(-1)^(n - i)*Binomial[n - k, n - i]*sf[2*i], {i, k, n}]; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

A163772 Triangle interpolating the swinging factorial (A056040) restricted to odd indices with its binomial inverse. Triangle read by rows. For n >= 0, k >= 0.

Original entry on oeis.org

1, 5, 6, 19, 24, 30, 67, 86, 110, 140, 227, 294, 380, 490, 630, 751, 978, 1272, 1652, 2142, 2772, 2445, 3196, 4174, 5446, 7098, 9240, 12012, 7869, 10314, 13510, 17684, 23130, 30228, 39468, 51480
Offset: 0

Views

Author

Peter Luschny, Aug 05 2009

Keywords

Examples

			Triangle begins:
     1;
     5,    6;
    19,   24,   30;
    67,   86,  110,  140;
   227,  294,  380,  490,  630;
   751,  978, 1272, 1652, 2142, 2772;
  2445, 3196, 4174, 5446, 7098, 9240, 12012;
		

Crossrefs

Programs

  • Maple
    For the functions 'DiffTria' and 'swing' see A163770. Computes n rows of the triangle.
    a := n -> DiffTria(k->swing(2*k+1),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[ (-1)^(n-i)*Binomial[n-k, n-i]*sf[2*i+1], {i, k, n}]; Table[t[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,n-i)*(2i+1)$ where i$ denotes the swinging factorial of i (A056040).

A163842 Triangle interpolating the swinging factorial (A056040) restricted to odd indices with its binomial transform. Same as interpolating the beta numbers 1/beta(n,n) (A002457) with (A163869). Triangle read by rows, for n >= 0, k >= 0.

Original entry on oeis.org

1, 7, 6, 43, 36, 30, 249, 206, 170, 140, 1395, 1146, 940, 770, 630, 7653, 6258, 5112, 4172, 3402, 2772, 41381, 33728, 27470, 22358, 18186, 14784, 12012, 221399, 180018, 146290, 118820, 96462, 78276, 63492, 51480
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Examples

			Triangle begins:
      1;
      7,     6;
     43,    36,    30;
    249,   206,   170,   140;
   1395,  1146,   940,   770,   630;
   7653,  6258,  5112,  4172,  3402,  2772;
  41381, 33728, 27470, 22358, 18186, 14784, 12012;
		

Crossrefs

Programs

  • Maple
    # Computes n rows of the triangle. For the functions 'SumTria' and 'swing' see A163840.
    a := n -> SumTria(k->swing(2*k+1),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[Binomial[n-k, n-i]*sf[2*i+1], {i, k, n}]; Table[t[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = Sum_{i=k..n} binomial(n-k,n-i)*(2i+1)$ where i$ denotes the swinging factorial of i (A056040).

A163649 Triangle interpolating between (-1)^n (A033999) and A056040(n), read by rows.

Original entry on oeis.org

1, -1, 1, 1, -2, 2, -1, 3, -6, 6, 1, -4, 12, -24, 6, -1, 5, -20, 60, -30, 30, 1, -6, 30, -120, 90, -180, 20, -1, 7, -42, 210, -210, 630, -140, 140, 1, -8, 56, -336, 420, -1680, 560, -1120, 70
Offset: 0

Views

Author

Peter Luschny, Aug 02 2009

Keywords

Comments

Given T(n,k) = (-1)^(n-k)*floor(k/2)!^(-2)*n!/(n-k)!, let A(n,k) = abs(T(n,k)) be the coefficients of the polynomials Sum_{k=0..n} binomial(n,k)*A056040(k)*q^k. Substituting q^k -> 1/(floor(k/2)+1) in the polynomials gives the extended Motzkin numbers A189912. (See A089627 for the Motzkin numbers and A194586 for the complementary Motzkin numbers.)

Examples

			1
-1, 1
1, -2, 2
-1, 3, -6, 6
1, -4, 12, -24, 6
-1, 5, -20, 60, -30, 30
1, -6, 30, -120, 90, -180, 20
-1, 7, -42, 210, -210, 630, -140, 140
1, -8, 56, -336, 420, -1680, 560, -1120, 70
		

Crossrefs

Row sums give A163650, row sums of absolute values give A163865.
Aerated versions A194586 (odd case) and A089627 (even case).

Programs

  • Maple
    a := proc(n,k) (-1)^(n-k)*floor(k/2)!^(-2)*n!/(n-k)! end:
    seq(print(seq(a(n,k),k=0..n)),n=0..8);
  • Mathematica
    t[n_, k_] := (-1)^(n - k)*Floor[k/2]!^(-2)*n!/(n - k)!; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 29 2013 *)
  • PARI
    for(n=0,10, for(k=0,n, print1((-1)^(n -k)*( (floor(k/2))! )^(-2)*(n!/(n - k)!), ", "))) \\ G. C. Greubel, Aug 01 2017

Formula

T(n,k) = (-1)^(n-k)*floor(k/2)!^(-2)*n!/(n-k)!.
E.g.f.: egf(x,y) = exp(-x)*BesselI(0,2*x*y)*(1+x*y).

A163840 Triangle interpolating the binomial transform of the swinging factorial (A163865) with the swinging factorial (A056040).

Original entry on oeis.org

1, 2, 1, 5, 3, 2, 16, 11, 8, 6, 47, 31, 20, 12, 6, 146, 99, 68, 48, 36, 30, 447, 301, 202, 134, 86, 50, 20, 1380, 933, 632, 430, 296, 210, 160, 140, 4251, 2871, 1938, 1306, 876, 580, 370, 210, 70, 13102, 8851, 5980, 4042, 2736, 1860, 1280, 910, 700, 630
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Comments

Triangle read by rows.
An analog to the binomial triangle of the factorials (A076571).

Examples

			Triangle begins
    1;
    2,   1;
    5,   3,   2;
   16,  11,   8,   6;
   47,  31,  20,  12,  6;
  146,  99,  68,  48, 36, 30;
  447, 301, 202, 134, 86, 50, 20;
		

Crossrefs

Row sums are A163843.

Programs

  • Maple
    SumTria := proc(f,n,display) local m,A,j,i,T; T:=f(0);
    for m from 0 by 1 to n-1 do A[m] := f(m);
    for j from m by -1 to 1 do A[j-1] := A[j-1] + A[j] od;
    for i from 0 to m do T := T,A[i] od;
    if display then print(seq(T[i],i=nops([T])-m..nops([T]))) fi;
    od; subsop(1=NULL,[T]) end:
    swing := proc(n) option remember; if n = 0 then 1 elif
    irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    # Computes n rows of the triangle:
    A163840 := n -> SumTria(swing,n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[Binomial[n - k, n - i]*sf[i], {i, k, n}]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = Sum_{i=k..n} binomial(n-k,n-i)*i$ where i$ denotes the swinging factorial of i (A056040), for n >= 0, k >= 0.

A163841 Triangle interpolating the swinging factorial (A056040) restricted to even indices with its binomial transform. Same as interpolating bilateral Schroeder paths (A026375) with the central binomial coefficients (A000984).

Original entry on oeis.org

1, 3, 2, 11, 8, 6, 45, 34, 26, 20, 195, 150, 116, 90, 70, 873, 678, 528, 412, 322, 252, 3989, 3116, 2438, 1910, 1498, 1176, 924, 18483, 14494, 11378, 8940, 7030, 5532, 4356, 3432, 86515, 68032, 53538
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Comments

For n >= 0, k >= 0 let T(n,k) = sum{i=k..n} binomial(n-k,n-i)*(2i)$ where i$ denotes the swinging factorial of i (A056040). Triangle read by rows.

Examples

			Triangle begins
     1;
     3,    2;
    11,    8,    6;
    45,   34,   26,   20;
   195,  150,  116,   90,   70;
   873,  678,  528,  412,  322,  252;
  3989, 3116, 2438, 1910, 1498, 1176,  924;
		

Crossrefs

Programs

  • Maple
    Computes n rows of the triangle. For the functions 'SumTria' and 'swing' see A163840.
    a := n -> SumTria(k->swing(2*k),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[Binomial[n - k, n - i]*sf[2*i], {i, k, n}]; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

A163865 The binomial transform of the swinging factorial (A056040).

Original entry on oeis.org

1, 2, 5, 16, 47, 146, 447, 1380, 4251, 13102, 40343, 124136, 381625, 1172198, 3597401, 11031012, 33798339, 103477590, 316581567, 967900224, 2957316429, 9030317478, 27558851565, 84059345244, 256265811333, 780885245826, 2378410969977, 7241027262280
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Comments

a(n) = Sum_{k=0..n} binomial(n,k) * k$, where k$ denotes the swinging factorial of k (A056040). The swinging analog to the number of arrangements, the binomial transform of the factorial (A000522).

Crossrefs

Programs

  • Maple
    a := proc(n) local k: add(binomial(n,k)*(k!/iquo(k, 2)!^2),k=0..n) end:
    seq(coeff(series((1-z-4*z^2)/((1+z)*(1-3*z))^(3/2),z,28),z,n),n=0..27); # Peter Luschny, Oct 31 2013
  • Mathematica
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[0] = 1; a[n_] := Sum[Binomial[n, k]*sf[k], {k, 0, n}]; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Jul 26 2013 *)
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_] := Sum[Binomial[n, k]*sf[k], {k, 0, n}]; Table[t[n], {n,0,50}] (* G. C. Greubel, Aug 06 2017 *)
  • PARI
    x='x+O('x^50); Vec((1-x-4*x^2)/((1+x)*(1-3*x))^(3/2)) \\ G. C. Greubel, Aug 06 2017

Formula

E.g.f.: exp(x)*BesselI(0,2*x)*(1+x). - Peter Luschny, Aug 26 2012
O.g.f.: (1-x-4*x^2)/((1+x)*(1-3*x))^(3/2). - Peter Luschny, Oct 31 2013
a(n) ~ 3^(n - 1/2) * sqrt(n) / (2*sqrt(Pi)). - Vaclav Kotesovec, Nov 27 2017
Showing 1-8 of 8 results.