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.

A000475 Rencontres numbers: number of permutations of [n] with exactly 4 fixed points.

Original entry on oeis.org

1, 0, 15, 70, 630, 5544, 55650, 611820, 7342335, 95449640, 1336295961, 20044438050, 320711010620, 5452087178160, 98137569209940, 1864613814984984, 37292276299704525, 783137802293789040, 17229031650463366195, 396267727960657413630
Offset: 4

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 65.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A008290.
A diagonal of A008291.
Cf. A170942.

Programs

  • Maple
    a:=n->sum(n!*sum((-1)^k/(k-3)!, j=0..n), k=3..n): seq(-a(n)/4!, n=3..22); # Zerinvary Lajos, May 25 2007
    G(x):=exp(-x)/(1-x)*(x^4/4!): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=4..23); # Zerinvary Lajos, Apr 03 2009
  • Mathematica
    Table[Subfactorial[n - 4]*Binomial[n, 4], {n, 4, 23}] (* Zerinvary Lajos, Jul 10 2009 *)
  • PARI
    x='x+O('x^66); Vec( serlaplace(exp(-x)/(1-x)*(x^4/4!)) ) \\ Joerg Arndt, Feb 19 2014
    
  • Python
    from sympy import binomial
    A000475_list, m, x = [], 1, 0
    for n in range(4,100):
        x, m = x*n + m*binomial(n,4), -m
        A000475_list.append(x) # Chai Wah Wu, Nov 01 2014

Formula

a(n) = sum((-1)^j*n!/(4!*j!), j=2..n-4) = A008290(n,4).
a(n) = A000166(n)*binomial(n+4, 4). - Robert Goodhand (robert(AT)rgoodhand.fsnet.co.uk), Nov 08 2001
E.g.f.: (exp(-x)/(1-x))*(x^4/4!). In general, for k fixed points:(exp(-x)/(1-x)) * (x^k/k!). - Wenjin Woan, Nov 22 2008
a(n) ~ n! * exp(-1)/24, in general a(n) ~ n! * exp(-1)/k!. - Vaclav Kotesovec, Mar 16 2014
a(n) = n*a(n-1) + (-1)^n*binomial(n,4) with a(n) = 0 for n = 0,1,2,3. - Chai Wah Wu, Nov 01 2014
D-finite with recurrence (-n+4)*a(n) +n*(n-5)*a(n-1) +n*(n-1)*a(n-2)=0. - R. J. Mathar, Nov 02 2015
O.g.f.: (1/24)*Sum_{k>=4} k!*x^k/(1 + x)^(k+1). - Ilya Gutkovskiy, Apr 13 2017

Extensions

Formula corrected by Sean A. Irvine, Oct 26 2010