%I #36 Sep 08 2022 08:45:29
%S 1,-2,36,-1800,176400,-28576800,6915585600,-2337467932800,
%T 1051860569760000,-607975409321280000,438958245529964160000,
%U -387161172557428389120000,409616520565759235688960000,-512020650707199044611200000000,746526108731096207043129600000000,-1255656914885703820246543987200000000
%N Define an array by d(m, 0) = 1, d(m, 1) = m; d(m, k) = (m - k + 1) d(m+1, k-1) - (k-1) (m+1) d(m+2, k-2). Sequence gives d(0,2n).
%C |a(n)| is the number of functions f:{1,2,...,2n}->{1,2,...,2n} such that each element has either 0 or 2 preimages. That is, |(f^-1)(x)| is in {0,2} for all x in {1,2,...,2n}. - _Geoffrey Critzer_, Feb 24 2012.
%D V. van der Noort and N. J. A. Sloane, Paper in preparation, 2007.
%H G. C. Greubel, <a href="/A126934/b126934.txt">Table of n, a(n) for n = 0..150</a>
%H Philippe Flajolet and Robert Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/AnaCombi/anacombi.html">Analytic Combinatorics</a>, Cambridge Univ. Press, 2009, page 131.
%H S. Goodenough, C. Lavault, <a href="http://arxiv.org/abs/1404.1894">On subsets of Riordan subgroups and Heisenberg--Weyl algebra</a>, arXiv preprint arXiv:1404.1894 [cs.DM], 2014-2016.
%H S. Goodenough, C. Lavault, <a href="https://doi.org/10.37236/5264">Overview on Heisenberg—Weyl Algebra and Subsets of Riordan Subgroups</a>, The Electronic Journal of Combinatorics, 22(4) (2015), #P4.16.
%F a(n) = (-1)^n * A001147(n) * A001813(n). - _N. J. A. Sloane_, Mar 21 2007
%F E.g.f. for positive values with interpolated zeros:
%F (1-2*x^2)^(-1/2) which is exp(log(1/(1-x*G(x)))) where
%F G(x) is the e.g.f. for A036770. - _Geoffrey Critzer_, Feb 24 2012
%F a(n) = (-8)^n * gamma(n + 1/2)^2 / Pi. - _Daniel Suteu_, Jan 06 2017
%p T:= proc(n, k) option remember;
%p if k=0 then 1
%p elif k=1 then n
%p else (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2)
%p fi; end:
%p seq(T(0, 2*k), n=0..15); # _G. C. Greubel_, Jan 28 2020
%t nn=40;b=(1-(1-2x^2)^(1/2))/x;Select[Range[0,nn]!CoefficientList[Series[1/(1-x b),{x,0,nn}],x],#>0&]*Table[(-1)^(n),{n,0,nn/2}] (* _Geoffrey Critzer_, Feb 24 2012 *)
%t T[n_, k_]:= T[n, k]= If[k==0, 1, If[k==1, n, (n-k+1)*T[n+1, k-1] - (k-1)*(n+1)* T[n+2, k-2]]]; Table[T[0, 2*n], {n,0,15}] (* _G. C. Greubel_, Jan 28 2020 *)
%o (PARI) T(n,k) = if(k==0, 1, if(k==1, n, (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2) ));
%o vector(15, n, T(0,2*(n-1)) ) \\ _G. C. Greubel_, Jan 28 2020
%o (Magma)
%o function T(n,k)
%o if k eq 0 then return 1;
%o elif k eq 1 then return n;
%o else return (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2);
%o end if; return T; end function;
%o [T(0,2*n): n in [0..15]]; // _G. C. Greubel_, Jan 28 2020
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k==0): return 1
%o elif (k==1): return n
%o else: return (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2)
%o [T(0, 2*n) for n in (0..15)] # _G. C. Greubel_, Jan 28 2020
%Y See A105937 for the full array.
%Y See also A127080.
%K sign
%O 0,2
%A Vincent v.d. Noort, Mar 21 2007
|