%I #23 Jul 31 2017 14:24:59
%S 1,1,2,4,16,80,400,2800,22400,179200,1792000,19712000,216832000,
%T 2818816000,39463424000,552487936000,8839806976000,150276718592000,
%U 2554704216064000,48539380105216000,970787602104320000,19415752042086400000,427146544925900800000,9824370533295718400000,225960522265801523200000,5649013056645038080000000,146874339472770990080000000,3818732826292045742080000000
%N Number of permutations of n elements without cycles whose length is a multiple of 3.
%C Differs from A247007 first at n=27. - _Alois P. Heinz_, Sep 09 2014
%H Alois P. Heinz, <a href="/A102736/b102736.txt">Table of n, a(n) for n = 0..450</a>
%F E.g.f.: (1-x^3)^(1/3)/(1-x).
%F a(n) ~ n! * 3^(1/3) / (GAMMA(2/3) * n^(1/3)). - _Vaclav Kotesovec_, Mar 15 2014
%e G.f. = 1 + x + 2*x^2 + 4*x^3 + 16*x^4 + 80*x^5 + 400*x^6 + 2800*x^7 + ...
%p a:= proc(n) option remember; `if`(n=0, 1, add(`if`(
%p irem(j, 3)=0, 0, a(n-j)*(j-1)!*binomial(n-1, j-1)), j=1..n))
%p end:
%p seq(a(n), n=0..27); # _Alois P. Heinz_, Jul 31 2017
%t nn=21;a=Sum[x^n/n,{n,3,nn,3}];Range[0,nn]!CoefficientList[Series[Exp[Log[1/(1-x)]-a],{x,0,nn}],x] (* _Geoffrey Critzer_, Nov 11 2012 *)
%t a[ n_] := If[ n < 0, 0, n! With[{m = Quotient[n, 3]}, (-1)^m Binomial[-2/3, m]]]; (* _Michael Somos_, Aug 05 2016 *)
%o (PARI) {a(n) = my(m); if( n<0, 0, m = n\3; n! * (-1)^m * binomial(-2/3, m))}; /* _Michael Somos_, Aug 05 2016 */
%Y Cf. A000090, A000246.
%K easy,nonn
%O 0,3
%A _Vladeta Jovovic_, Feb 08 2005
|