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

A347106 Number of derangements of [n] having an even number of 2-cycles.

Original entry on oeis.org

1, 0, 0, 2, 9, 24, 160, 1350, 10353, 89936, 910656, 10070730, 120546745, 1566125352, 21934589664, 329037515534, 5264316535905, 89493067364640, 1610885172539008, 30606819613112466, 612136012448309481, 12854856587833586360, 282806860558105285920
Offset: 0

Views

Author

Alois P. Heinz, Jan 27 2022

Keywords

Examples

			a(3) = 2: (123), (132).
a(4) = 9: (12)(34), (13)(24), (14)(23), (1234), (1243), (1324), (1342), (1423), (1432).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
         `if`(j=2, 1-t, t))*binomial(n-1, j-1)*(j-1)!, j=2..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..27);

Formula

E.g.f.: (exp(-x)+exp(-x*(x+1)))/(2-2*x).
a(n) = A000166(n) - A248087(n).
a(n) = Sum_{k=0..floor(n/4)} A162974(n,2*k).
a(n) mod 2 = A121262(n).
Showing 1-1 of 1 results.