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.

A177260 Number of derangements of {1,2,...,n} having no adjacent 4-cycles (an adjacent 4-cycle is a cycle of the form (i,i+1,i+2,i+3)).

This page as a plain text file.
%I A177260 #26 May 18 2024 15:11:42
%S A177260 1,0,1,2,8,44,262,1846,14789,133232,1333112,14669758,176081478,
%T A177260 2289458896,32056423888,480890367598,7694774125983,130818028518432,
%U A177260 2354820682603399,44743035640567412,894883797133726171,18792952193893804872,413452012727711517437
%N A177260 Number of derangements of {1,2,...,n} having no adjacent 4-cycles (an adjacent 4-cycle is a cycle of the form (i,i+1,i+2,i+3)).
%H A177260 G. C. Greubel, <a href="/A177260/b177260.txt">Table of n, a(n) for n = 0..445</a>
%H A177260 R. A. Brualdi and Emeric Deutsch, <a href="http://arxiv.org/abs/1005.0781">Adjacent q-cycles in permutations</a>, arXiv:1005.0781 [math.CO], 2010.
%F A177260 a(n) = Sum_{s=0..n} Sum_{t=0..floor((n-s)/4)} (-1)^(s+t)*(n-3*t)!/(s!*t!).
%F A177260 a(n) ~ exp(-1) * n!. - _Vaclav Kotesovec_, Dec 10 2021
%F A177260 Conjecture: D-finite with recurrence a(n) = (n-1)*a(n-1) + (n-1)*a(n-2) + 2*a(n-4) + (n-1)*a(n-5) + 3*a(n-8). - _R. J. Mathar_, Jul 26 2022
%F A177260 G.f.: Sum_{k>=0} k! * x^k / (1+x+x^4)^(k+1). - _Seiichi Manyama_, Feb 22 2024
%e A177260 a(6)=262 because among the 265 (= A000166(6)) derangements of {1,2,3,4,5,6} only (1234)(56), (16)(2345), and (12)(3456) have adjacent 4-cycles.
%p A177260 a := proc (n) local ct, t, s: ct := 0: for s from 0 to n do for t from 0 to (1/4)*n do if s+4*t <= n then ct := ct+(-1)^(s+t)*factorial(n-3*t)/(factorial(s)*factorial(t)) else end if end do end do: ct end proc; seq(a(n), n = 0 .. 22);
%t A177260 a[n_] := Module[{ct = 0, t, s}, For[s = 0, s <= n, s++, For[t = 0, t <= n/3, t++, If[s + 4*t <= n, ct = ct + (-1)^(s + t)*Factorial[n - 3*t] / (Factorial[s]*Factorial[t])]]]; ct];
%t A177260 Table[a[n], {n, 0, 22}] (* _Jean-François Alcover_, Nov 24 2017, translated from Maple *)
%o A177260 (Magma)
%o A177260 F:=Factorial;
%o A177260 A177258:= func< n | (&+[(&+[(-1)^(j+k)*F(n-3*k)/(F(j)*F(k)): k in [0..Floor((n-j)/4)]]): j in [0..n]]) >;
%o A177260 [A177258(n): n in [0..40]]; // _G. C. Greubel_, May 13 2024
%o A177260 (SageMath)
%o A177260 f=factorial;
%o A177260 def A177260(n): return sum(sum((-1)^(j+k)*f(n-3*k)/(f(j)*f(k)) for k in range(1+(n-j)//4)) for j in range(n+1))
%o A177260 [A177260(n) for n in range(41)] # _G. C. Greubel_, May 13 2024
%Y A177260 Cf. A000166, A177258, A177259.
%K A177260 nonn
%O A177260 0,4
%A A177260 _Emeric Deutsch_, May 08 2010