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.

Previous Showing 11-18 of 18 results.

A127548 O.g.f.: Sum_{n>=0} n!*(x/(1+x)^2)^n.

Original entry on oeis.org

1, 1, 0, 1, 4, 19, 112, 771, 6088, 54213, 537392, 5867925, 69975308, 904788263, 12607819040, 188341689287, 3002539594128, 50878366664393, 913161208490016, 17304836525709097, 345279674107957524, 7235298537356113339
Offset: 0

Views

Author

Vladeta Jovovic, Jun 27 2007

Keywords

Comments

a(n+1) = inverse binomial transform of A013999 = Sum_{k=0..n} binomial(n,k)*(-1)^(n-k)*A013999(k). - Emanuele Munarini, Jul 01 2013

Crossrefs

Programs

  • Maple
    A127548 := proc(n) if n = 0 then 1 ; else add(factorial(s)*(-1)^(n-s)*binomial(s+n-1,2*s-1),s=1..n) ; fi ; end: for n from 0 to 20 do printf("%d,",A127548(n)) ; od ; # R. J. Mathar, Jul 13 2007
  • Mathematica
    nn = 21; CoefficientList[Series[Sum[n!*(x/(1 + x)^2)^n, {n, 0, nn}], {x, 0, nn}], x] (* Michael De Vlieger, Sep 04 2016 *)
  • Python
    import math
    def binomial(n,m):
        a=1
        for k in range(n-m+1,n+1):
            a *= k
        return a//math.factorial(m)
    def A127548(n):
        if n == 0:
            return 1
        a=0
        for s in range(1,n+1):
            a += (-1)**(n-s)*binomial(s+n-1,2*s-1)*math.factorial(s)
        return a
    for n in range(30):
        print(A127548(n))
    # R. J. Mathar, Oct 20 2009

Formula

a(n) = Sum_{s=1..n} (-1)^(n-s)*s!*C(s+n-1,2s-1) if n>=1, where C(a,b)=binomial(a,b). - R. J. Mathar, Jul 13 2007
G.f.: Q(0) where Q(k) = 1 + (2*k + 1)*x/( (1+x)^2- 2*x*(1+x)^2*(k+1)/(2*x*(k+1) + (1+x)^2/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Mar 08 2013
a(n) = A000271(n) + A000271(n-1). - Peter Bala, Sep 02 2016
a(n) ~ exp(-2) * n!. - Vaclav Kotesovec, Oct 31 2017

Extensions

More terms from R. J. Mathar, Jul 13 2007
More terms from R. J. Mathar, Oct 20 2009

A137886 Number of (directed) Hamiltonian paths in the n-crown graph.

Original entry on oeis.org

12, 144, 3840, 138240, 6804000, 436504320, 35417088000, 3546005299200, 429451518988800, 61883150757120000, 10463789706751180800, 2051763183437532364800, 461802751261297205760000, 118254166096501129863168000
Offset: 3

Views

Author

Eric W. Weisstein, Feb 20 2008

Keywords

Comments

The reference to A094047 arises in the formula because that sequence is also the number of directed Hamiltonian cycles in the n-crown graph. (Each cycle can be broken in 2n ways to give a path.) - Andrew Howroyd, Feb 21 2016
Also, the number of ways of seating n married couples at 2*n chairs arranged side-by-side in a straight line, men and women in alternate positions, so that no husband is next to his wife. - Andrew Howroyd, Sep 19 2017

Crossrefs

Programs

  • Mathematica
    Table[2 n! Sum[(-1)^(n - k) k! Binomial[n + k, 2 k], {k, 0, n}], {n, 3, 20}] (* Eric W. Weisstein, Sep 20 2017 *)
    Table[2 (-1)^n n! HypergeometricPFQ[{1, -n, n + 1}, {1/2}, 1/4], {n, 3, 20}] (* Eric W. Weisstein, Sep 20 2017 *)
  • PARI
    /* needs the routine nhp() from the Alekseyev link */
    { A137886(n) = nhp( matrix(2*n,2*n,i,j, if(min(i,j)<=n && max(i,j)>n && abs(j-i)!=n, 1, 0)) ) }

Formula

For n>3, a(n) = 2*n*A094047(n) + n*a(n-1) = A059375(n) + n*a(n-1). - Andrew Howroyd, Feb 21 2016
a(n) ~ 4*Pi*n^(2*n+1) / exp(2*n+2). - Vaclav Kotesovec, Feb 25 2016
a(n) = (n-1)*n*a(n-1) + (n-1)^2*n*a(n-2) + (n-2)*(n-1)*n*a(n-3). - Vaclav Kotesovec, Feb 25 2016
a(n) = 2*n! * A000271(n). - Andrew Howroyd, Sep 19 2017

Extensions

More terms from Max Alekseyev, Feb 13 2009
a(14) from Eric W. Weisstein, Jan 15 2014
a(15)-a(16) from Andrew Howroyd, Feb 21 2016

A273596 For n >= 2, a(n) is the number of slim rectangular diagrams of length n.

Original entry on oeis.org

1, 3, 9, 32, 139, 729, 4515, 32336, 263205, 2401183, 24275037, 269426592, 3257394143, 42615550453, 599875100487, 9040742057760, 145251748024649, 2478320458476795, 44755020000606961, 852823700470009056, 17101229029400788083, 359978633317886558801, 7936631162022905081707
Offset: 2

Views

Author

Tamas Dekany, May 26 2016

Keywords

Examples

			The initial term is the diagram of the four element diamond shape lattice.
		

Crossrefs

Programs

  • Maple
    A273596 := proc (n) option remember; `if`(n = 2, 1, `if`(n = 3, 3, (n-2)*procname(n-1) + procname(n-2) + 2)) end: seq(A273596(n), n = 2..20); # Peter Bala, Jan 08 2017
  • Mathematica
    x = 15;
    SRectD = Table[0, {x}];
    For[n = 2, n < x, n++,
    For[a = 1, a < n, a++,
       For[b = 1, b <= n - a, b++,
        SRectD[[n]] +=
          Binomial[n - a - 1, b - 1]*
           Binomial[n - b - 1, a - 1]*(n - a - b)!;
        ]
       ]
      Print[n, " ", SRectD[[n]]]
    ]
    (* Alternatively: *)
    T[n_, k_] := HypergeometricPFQ[{k+1, k-n}, {}, -1];
    Table[Sum[T[n,k], {k,0,n}], {n,0,22}] (* Peter Luschny, Oct 05 2017 *)
  • PARI
    a(n)= sum(rps=1, n, sum(r=1, n, s = rps-r; binomial(n-r-1, s-1) * binomial(n-s-1, r-1) * (n-r-s)!)); \\ Michel Marcus, Jun 12 2016

Formula

a(n) = Sum_{1<=r,s; r+s<=n} binomial(n-r-1, s-1) * binomial(n-s-1, r-1) * (n-r-s)!.
a(n) ~ exp(2) * n! / n^2. - Vaclav Kotesovec, Jun 29 2016
a(n) = Sum_{k=0..n} hypergeom([k+1, k-n], [], -1). - Peter Luschny, Oct 05 2017
From Peter Bala, Jan 08 2018: (Start)
a(n) = Sum_{k = 0..n-2} k!*binomial(n+k-1, 2*k+1).
a(n) = (n - 2)*a(n-1) + a(n-2) + 2, with a(2) = 1, a(3) = 3.
a(n+2) = 1/n!*Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)* A000522(n)^2.
Row sums of array A143409 read as a triangle.
O.g.f.: Sum_{n >= 0} n!*x^(n+2)/(1 - x)^(2*n+2). Cf. A000179, A000271, A000904 and A127548.
O.g.f. with offset 0: 1/(1 - x) o 1/(1 - x) = 1 + 3*x + 9*x^2 + 32*x^3 + ..., where o denotes the white diamond multiplication of power series. See the Bala link for details. (End)

A292574 Number of permutations p of {1,2,...,n} such that p(i)-i not in {-1,0,1,2}.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 6, 58, 499, 4814, 50284, 572228, 7050770, 93637691, 1334156612, 20308818956, 329025006637, 5653813150732, 102722614426328, 1967763318700136, 39640921470181124, 837836538203311613, 18539041315706787978, 428620090892592760870
Offset: 0

Views

Author

Andrew Howroyd, Sep 19 2017

Keywords

Crossrefs

A097625 a(n) = Sum_{k=0..n} (-2)^k * binomial(2n-k,k) * (n-k)!.

Original entry on oeis.org

-1, 0, 2, -4, 8, 0, 80, 544, 5248, 53504, 601344, 7339520, 96797696, 1371889664, 20797212672, 335835828224, 5755617771520, 104346351861760, 1995288143593472, 40135085601325056, 847203499270995968
Offset: 1

Views

Author

Ralf Stephan, Sep 20 2004

Keywords

Comments

Permanent of certain n X 2 Toeplitz-(1,-1) matrices.

Crossrefs

Cf. A000271.

Programs

  • Maple
    A097625 := proc(n) add((-2)^k*(n-k)!*binomial(2*n-k,k),k=0..n) ; end proc:
    seq(A097625(n),n=1..30) ; # R. J. Mathar, Sep 18 2011

A156368 A ménage triangle.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 3, 8, 6, 6, 1, 16, 35, 38, 20, 10, 1, 96, 211, 213, 134, 50, 15, 1, 675, 1459, 1479, 915, 385, 105, 21, 1, 5413, 11584, 11692, 7324, 3130, 952, 196, 28, 1, 48800, 103605, 104364, 65784, 28764, 9090, 2100, 336, 36, 1
Offset: 0

Views

Author

Paul Barry, Feb 08 2009

Keywords

Examples

			Triangle begins:
   1;
   0,   1;
   0,   1,   1;
   1,   1,   3,   1;
   3,   8,   6,   6,  1;
  16,  35,  38,  20, 10,  1;
  96, 211, 213, 134, 50, 15,  1;
		

References

  • A. Kaufmann, Introduction à la combinatorique en vue des applications, p.188-189, Dunod, Paris, 1968. - Philippe Deléham, Apr 04 2014

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:= Sum[(-1)^(k+j)*Binomial[j, k]*Binomial[2*n-j, j]*(n-j)!, {j,0,n}];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 05 2021 *)
  • Sage
    def A156368(n,k): return sum( (-1)^(k+j)*binomial(j, k)*binomial(2*n-j, j)*factorial(n-j) for j in (0..n) )
    flatten([[A156368(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 05 2021

Formula

T(n, k) = Sum_{j=0..n} (-1)^(k+j)*binomial(j, k)*binomial(2*n-j, j)*(n-j)!.
T(n, 0) = A000271(n).
Sum_{k=0..n} T(n, k) = n!.
Equals A155856*A007318^{-1}.
G.f.: 1/(1 +x -x*y -x/(1 +x -x*y -x/(1 +x -x*y -2*x/(1 +x -x*y -2*x/(1 +x -x*y -3*x/(1 +x -x*y -3*x/(1 +x -x*y -4*x/(1 + ... (continued fraction).
G.f.: Sum_{n>=0} n! * x^n/(1 + (1-y)*x)^(2*n+1). - Ira M. Gessel, Jan 15 2013

A293042 Number of even permutations p of {1,...,n} such that p(i) is not i or i+1.

Original entry on oeis.org

1, 0, 0, 1, 1, 9, 47, 339, 2705, 24402, 244294, 2689669, 32297985, 420096147, 5883813373, 88287031271, 1412982765793, 24026200566404, 432554403678604, 8219863859175945, 164419973194802817, 3453229295483253853, 75978854506098365995, 1747670263607990439483
Offset: 0

Views

Author

Eric M. Schmidt, Sep 28 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := (Sum[(-1)^(n-k) k! Binomial[n+k, 2 k], {k, 0, n}] + (-1)^(n-1)* Floor[(n-1)/2])/2; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Feb 18 2019 *)

Formula

a(n) = (A000271(n) + (-1)^(n-1) * floor((n-1)/2))/2.

A293043 Number of odd permutations p of {1,...,n} such that p(i) is not i or i+1.

Original entry on oeis.org

0, 0, 0, 0, 2, 7, 49, 336, 2708, 24398, 244298, 2689664, 32297990, 420096141, 5883813379, 88287031264, 1412982765800, 24026200566396, 432554403678612, 8219863859175936, 164419973194802826, 3453229295483253843, 75978854506098366005, 1747670263607990439472
Offset: 0

Views

Author

Eric M. Schmidt, Sep 28 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := (Sum[(-1)^(n-k) k! Binomial[n+k, 2 k], {k, 0, n}] + (-1)^n* Floor[(n - 1)/2])/2; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Feb 18 2019 *)

Formula

a(n) = (A000271(n) + (-1)^n * floor((n-1)/2))/2.
Previous Showing 11-18 of 18 results.