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 A027616 #29 Aug 08 2022 08:29:54 %S A027616 0,0,1,3,9,45,285,1995,15855,142695,1427895,15706845,188471745, %T A027616 2450132685,34301992725,514529890875,8232476226975,139952095858575, %U A027616 2519137759913775,47863617438361725,957272348112505425,20102719310362613925,442259824841726816925,10171975971359716789275 %N A027616 Number of permutations of n elements containing a 2-cycle. %H A027616 Robert Israel, <a href="/A027616/b027616.txt">Table of n, a(n) for n = 0..449</a> %H A027616 Larry Carter and Stan Wagon, <a href="https://www.jstor.org/stable/48663293">The Mensa Correctional Institute</a>, The American Mathematical Monthly 125.4 (2018): 306-319. %F A027616 E.g.f.: (1 - exp(-x^2/2)) / (1-x). %F A027616 a(n) = n! * ( 1 - Sum_{k=0..floor(n/2)} (-1)^k / (2^k * k!) ). %F A027616 a(n) + A000266(n) = n!. - Yuval Dekel (dekelyuval(AT)hotmail.com), Nov 09 2003 %F A027616 Limit_{n -> oo} a(n)/n! = 1 - e^(-1/2) = 1 - A092605. - _Michel Marcus_, Aug 08 2013 %p A027616 S:= series((1-exp(-x^2/2))/(1-x), x, 101): %p A027616 seq(coeff(S,x,j)*j!,j=0..100); # _Robert Israel_, May 12 2016 %t A027616 nn=30; Table[n!,{n,0,nn}]-Range[0,nn]!CoefficientList[Series[Exp[-x^2/2]/(1-x),{x,0,nn}],x] (* _Geoffrey Critzer_, Oct 20 2012 *) %o A027616 (PARI) %o A027616 a(n) = n! * (1 - sum(k=0,floor(n/2), (-1)^k / (2^k * k!) ) ); %o A027616 /* _Joerg Arndt_, Oct 20 2012 */ %o A027616 (PARI) %o A027616 N=33; x='x+O('x^N); %o A027616 v=Vec( 'a0 + serlaplace( (1-exp(-x^2/2))/(1-x) ) ); %o A027616 v[1]-='a0; v %o A027616 /* _Joerg Arndt_, Oct 20 2012 */ %o A027616 (Magma) %o A027616 A027616:= func< n | Factorial(n)*(1- (&+[(-1/2)^j/Factorial(j): j in [0..Floor(n/2)]]) ) >; %o A027616 [A027616(n): n in [0..30]]; // _G. C. Greubel_, Aug 05 2022 %o A027616 (SageMath) %o A027616 def A027616(n): return factorial(n)*(1-sum((-1/2)^k/factorial(k) for k in (0..(n//2)))) %o A027616 [A027616(n) for n in (0..30)] # _G. C. Greubel_, Aug 05 2022 %Y A027616 Cf. A000266, A088436, A114320. %Y A027616 Column k=2 of A293211. %K A027616 nonn %O A027616 0,4 %A A027616 Joe Keane (jgk(AT)jgk.org) %E A027616 Added more terms, _Geoffrey Critzer_, Oct 20 2012