# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a187245 Showing 1-1 of 1 %I A187245 #12 Apr 15 2017 11:55:21 %S A187245 1,1,2,5,17,78,463,3315,27164,247975,2492539,27422698,328607417, %T A187245 4266367567,59686293284,895068242601,14320843215019,243467476610732, %U A187245 4382635181281015,83272415871044649,1665465961530365026,34974843092354081119,769445564105823722109 %N A187245 Number of permutations of [n] having no cycle with 2 alternating runs (it is assumed that the smallest element of the cycle is in the first position). %C A187245 a(n) = A187244(n,0). %H A187245 Alois P. Heinz, Table of n, a(n) for n = 0..450 %F A187245 E.g.f.: g(z)=exp[(4exp(z)-exp(2z)-3-2z)/4]/(1-z). %F A187245 a(n) ~ exp(exp(1)-exp(2)/4-5/4) * n! = 0.68455780023755436... * n!. - _Vaclav Kotesovec_, Mar 15 2014 %e A187245 a(3)=5 because we have among the 6 permutations of {1,2,3} only 312=(132) has a cycle with 2 alternating runs. %p A187245 g := exp((4*exp(z)-exp(2*z)-3-2*z)*1/4)/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 22); %p A187245 # second Maple program: %p A187245 a:= proc(n) option remember; %p A187245 `if`(n=0, 1, add(a(n-j)*binomial(n-1, j-1)* %p A187245 `if`(j=1, 1, (j-1)!-(2^(j-2)-1)), j=1..n)) %p A187245 end: %p A187245 seq(a(n), n=0..30); # _Alois P. Heinz_, Apr 15 2017 %t A187245 CoefficientList[Series[E^((4*E^x-E^(2*x)-3-2*x)/4)/(1-x), {x, 0, 20}], x]* Range[0, 20]! (* _Vaclav Kotesovec_, Mar 15 2014 *) %Y A187245 Cf. A187244. %K A187245 nonn %O A187245 0,3 %A A187245 _Emeric Deutsch_, Mar 07 2011 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE