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.

A137482 Number of permutations of n objects such that no two-element subset is preserved.

This page as a plain text file.
%I A137482 #19 Feb 19 2019 20:06:30
%S A137482 1,1,0,2,14,54,304,2260,18108,161756,1618496,17815896,213767080,
%T A137482 2778833992,38904145344,583563781424,9337011390224,158729175524880,
%U A137482 2857125341582848,54285381652008736,1085707629235539936,22799860214350346336,501596924799005576960
%N A137482 Number of permutations of n objects such that no two-element subset is preserved.
%C A137482 In other words, there are no two objects which the permutation leaves fixed and no two objects that the permutation swaps.
%C A137482 The limit as n -> infinity of a(n)/n! = 2/exp(3/2) or approximately 0.4462603203. - _Les Reid_, Jun 04 2012
%H A137482 Alois P. Heinz, <a href="/A137482/b137482.txt">Table of n, a(n) for n = 0..450</a>
%H A137482 Hannah Jackson, Kathryn Nyman and Les Reid, <a href="http://dx.doi.org/10.2140/involve.2013.6.25">Properties of generalized derangement graphs</a>, Involve, Vol. 6 (2013), No. 1, 25-33; DOI: 10.2140/involve.2013.6.25.
%F A137482 E.g.f.: (1+x)*exp(-x)*exp(-x^2/2)/(1-x).
%F A137482 a(n) = (n-1)*a(n-1) - a(n-2) + (n-2)*n*a(n-3) for n > 2, a(n) = (n+1)*(2-n)/2 for n < 3. - _Alois P. Heinz_, Feb 19 2019
%e A137482 a(3)=2 because we have 312 and 231.
%p A137482 g:=(1+x)*exp(-x)*exp(-(1/2)*x^2)/(1-x): gser:=series(g,x=0,25): seq(factorial(n)*coeff(gser,x,n),n=0..20);
%p A137482 # second Maple program:
%p A137482 a:= proc(n) option remember; `if`(n<3, (n+1)*(2-n)/2,
%p A137482       (n-1)*a(n-1)-a(n-2)+(n-2)*n*a(n-3))
%p A137482     end:
%p A137482 seq(a(n), n=0..23);  # _Alois P. Heinz_, Feb 19 2019
%t A137482 With[{nn=20},CoefficientList[Series[((1+x)Exp[-x]Exp[-x^2/2])/(1-x),{x,0,nn}],x] Range[0,nn]!] (* _Harvey P. Dale_, Nov 17 2013 *)
%Y A137482 Cf. A000166, A000266.
%K A137482 nonn
%O A137482 0,4
%A A137482 Jono Henshaw (jjono(AT)hotmail.com), Apr 22 2008, corrected Apr 30 2008