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.

A052554 Expansion of e.g.f.: (1-x)/(1 - x - x^2).

Original entry on oeis.org

1, 0, 2, 6, 48, 360, 3600, 40320, 524160, 7620480, 123379200, 2195424000, 42631142400, 896690995200, 20312541849600, 492993236736000, 12762901831680000, 351063491530752000, 10224590808047616000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Number of ways to use the elements of {1,..,n} once each to form a sequence of lists, each having length at least 2. - Bob Proctor, Apr 19 2005

Programs

  • GAP
    a:=[0,2];; for n in [3..20] do a[n]:=n*a[n-1]+n*(n-1)*a[n-2]; od; Concatenation([1], a); # G. C. Greubel, May 07 2019
  • Magma
    [1] cat [Fibonacci(n-1)*Factorial(n): n in [1..20]] // G. C. Greubel, May 07 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Z,Z,Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    With[{m=20}, CoefficientList[Series[(1-x)/(1-x-x^2), {x,0,m}], x]* Range[0, m]!] (* G. C. Greubel, May 07 2019 *)
  • PARI
    my(x='x+O('x^20)); Vec(serlaplace( (1-x)/(1-x-x^2) )) \\ G. C. Greubel, May 07 2019
    
  • Sage
    [1]+[fibonacci(n-1)*factorial(n) for n in (1..20)] # G. C. Greubel, May 07 2019
    

Formula

a(n) = n*a(n-1) + n*(n-1)*a(n-2), with a(0)=1, a(1)=0.
a(n) = Sum(1/5*(-1+3*_alpha)*_alpha^(-1-n), _alpha=RootOf(-1+_Z+_Z^2))*n!.
a(n) = n!*Fibonacci(n-1) for n >= 1. - Bob Proctor, Apr 19 2005
a(0) = 1; a(n) = Sum_{k=2..n} binomial(n,k) * k! * a(n-k). - Ilya Gutkovskiy, Feb 09 2020
a(n)=n!*A212804(n). - R. J. Mathar, Jun 03 2022