Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Feb 22 2024 10:41:53
%S 1,0,0,1,6,34,217,1567,12842,117704,1193802,13280778,160843345,
%T 2107036346,29689965966,447822830067,7199604972876,122907451783308,
%U 2220526880775841,42328779624824103,849065324387063412,17877539166289948864,394246737752465047380
%N Number of derangements of [n] having no adjacent 2-cycles, no adjacent 3-cycles, no adjacent 4-cycles and no adjacent 5-cycles.
%F G.f.: Sum_{k>=0} k! * x^k * ( (1-x)/(1-x^6) )^(k+1).
%F a(n) = Sum_{i, j, k, l, m>=0 and i+2*j+3*k+4*l+5*m<=n} (-1)^(i+j+k+l+m) * (n-j-2*k-3*l-4*m)!/(i!*j!*k!*l!*m!).
%o (PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*x^k*((1-x)/(1-x^6))^(k+1)))
%Y Cf. A000166, A177258, A177261, A370323.
%Y Cf. A177251, A370569.
%K nonn
%O 0,5
%A _Seiichi Manyama_, Feb 22 2024