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.

A126934 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).

Original entry on oeis.org

1, -2, 36, -1800, 176400, -28576800, 6915585600, -2337467932800, 1051860569760000, -607975409321280000, 438958245529964160000, -387161172557428389120000, 409616520565759235688960000, -512020650707199044611200000000, 746526108731096207043129600000000, -1255656914885703820246543987200000000
Offset: 0

Views

Author

Vincent v.d. Noort, Mar 21 2007

Keywords

Comments

|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.

References

  • V. van der Noort and N. J. A. Sloane, Paper in preparation, 2007.

Crossrefs

See A105937 for the full array.
See also A127080.

Programs

  • Magma
    function T(n,k)
      if k eq 0 then return 1;
      elif k eq 1 then return n;
      else return (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2);
      end if; return T; end function;
    [T(0,2*n): n in [0..15]]; // G. C. Greubel, Jan 28 2020
    
  • Maple
    T:= proc(n, k) option remember;
          if k=0 then 1
        elif k=1 then n
        else (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2)
          fi; end:
    seq(T(0, 2*k), n=0..15); # G. C. Greubel, Jan 28 2020
  • Mathematica
    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[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 *)
  • 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) ));
    vector(15, n, T(0,2*(n-1)) ) \\ G. C. Greubel, Jan 28 2020
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0): return 1
        elif (k==1): return n
        else: return (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2)
    [T(0, 2*n) for n in (0..15)] # G. C. Greubel, Jan 28 2020

Formula

a(n) = (-1)^n * A001147(n) * A001813(n). - N. J. A. Sloane, Mar 21 2007
E.g.f. for positive values with interpolated zeros:
(1-2*x^2)^(-1/2) which is exp(log(1/(1-x*G(x)))) where
G(x) is the e.g.f. for A036770. - Geoffrey Critzer, Feb 24 2012
a(n) = (-8)^n * gamma(n + 1/2)^2 / Pi. - Daniel Suteu, Jan 06 2017