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.
%I A347106 #38 Jan 31 2022 08:37:02 %S A347106 1,0,0,2,9,24,160,1350,10353,89936,910656,10070730,120546745, %T A347106 1566125352,21934589664,329037515534,5264316535905,89493067364640, %U A347106 1610885172539008,30606819613112466,612136012448309481,12854856587833586360,282806860558105285920 %N A347106 Number of derangements of [n] having an even number of 2-cycles. %H A347106 Alois P. Heinz, <a href="/A347106/b347106.txt">Table of n, a(n) for n = 0..450</a> %H A347106 Wikipedia, <a href="http://en.wikipedia.org/wiki/Derangement">Derangement</a>. %F A347106 E.g.f.: (exp(-x)+exp(-x*(x+1)))/(2-2*x). %F A347106 a(n) = A000166(n) - A248087(n). %F A347106 a(n) = Sum_{k=0..floor(n/4)} A162974(n,2*k). %F A347106 a(n) mod 2 = A121262(n). %e A347106 a(3) = 2: (123), (132). %e A347106 a(4) = 9: (12)(34), (13)(24), (14)(23), (1234), (1243), (1324), (1342), (1423), (1432). %p A347106 b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j, %p A347106 `if`(j=2, 1-t, t))*binomial(n-1, j-1)*(j-1)!, j=2..n)) %p A347106 end: %p A347106 a:= n-> b(n, 1): %p A347106 seq(a(n), n=0..27); %Y A347106 Cf. A000166, A088336, A121262, A162974, A248087. %K A347106 nonn %O A347106 0,4 %A A347106 _Alois P. Heinz_, Jan 27 2022