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-2 of 2 results.

A037256 a(n) = n!*Sum_{i=0..n-1} (n-i)*(-2)^i/(i+1)!.

Original entry on oeis.org

0, 1, 2, 10, 48, 296, 2080, 16752, 151424, 1519744, 16766208, 201685760, 2627316736, 36847260672, 553551644672, 8868624615424, 150943592939520, 2719816264613888, 51724646086475776, 1035359388788391936, 21759010038674358272, 479027478333199482880
Offset: 0

Views

Author

Keywords

Comments

Arises from "Unfriendly Seating Arrangement" problem around a circular table.

Crossrefs

Programs

  • Maple
    f:=n->n!*add((n-i)*(-2)^i/(i+1)!,i=0..n-1);
    [seq(f(n),n=0..50)]; # N. J. A. Sloane, Mar 29 2014
  • Mathematica
    m = 19; CoefficientList[ Series[(1 - Exp[-2x])*(1/((1-x)^2*2)), {x, 0, m}], x]*Range[0, m]!
    (* Jean-François Alcover, Jun 28 2011 *)
    Flatten[{0,Table[n!*Sum[Sum[(-1)^j*2^j/(j+1)!,{j,0,k}],{k,0,n-1}],{n,1,20}]}] (* Vaclav Kotesovec, Oct 27 2012 *)
  • PARI
    x='x+O('x^66); concat([0],Vec(serlaplace((1-exp(-2*x))/(2*(1-x)^2)))) \\ Joerg Arndt, May 04 2013

Formula

E.g.f.: (1-exp(-2*x))*(1-x)^(-2)/2.
a(n) = 2*(n-1)*a(n-1) - (n-4)*(n-1)*a(n-2) - 2*(n-2)*(n-1)*a(n-3). - Vaclav Kotesovec, Oct 08 2012
a(n) ~ (1-1/e^2)*n!*n/2. - Vaclav Kotesovec, Oct 08 2012
a(n) = (-2)^n + (n+1)!/2 - (3+n)*Gamma(1+n,-2)/(2*e^2). - Benedict W. J. Irwin, Jul 06 2020

Extensions

Entry revised by N. J. A. Sloane, Mar 29 2014

A239888 From second moments of unfriendly seating arrangement problem around a circular table with n seats.

Original entry on oeis.org

0, 0, 0, 8, 48, 464, 4000, 40032, 424704, 4927232, 61553664, 827632640, 11914946560, 183014995968, 2988450177024, 51709354532864, 945292051415040, 18207952013164544, 368620245155184640, 7825923453008609280, 173870718374040305664, 4034781267785209610240, 97622280693411826630656, 2458689656873584082026496, 64361542182239808476151808
Offset: 0

Views

Author

N. J. A. Sloane, Mar 29 2014

Keywords

Crossrefs

Programs

  • Maple
    g:=proc(n) local k; option remember;
    if n<=0 then 1 elif n=1 then u else
    expand(u/n*convert([seq(g(k-2)*g(n-k-1),k=1..n)],`+`));
    fi
    end:
    l2:=subs(u=1,diff([seq(g(j),j=0..25)],u,u));
    [seq(l2[i]*(i-1)!,i=1..26)];
  • Mathematica
    g[n_] := g[n] = Switch[n, -1|0, 1, 1, u, _, u/n Sum[g[k-2] g[n-k-1], {k, 1, n}]];
    D[Table[g[j] j!, {j, 0, 25}], {u, 2}] /. u -> 1 (* Jean-François Alcover, Jul 29 2018, from Maple *)
Showing 1-2 of 2 results.