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.

A177252 Triangle read by rows: T(n,k) is the number of permutations of [n] having k adjacent 4-cycles (0 <= k <= floor(n/4)), i.e., having k cycles of the form (i, i+1, i+2, i+3).

This page as a plain text file.
%I A177252 #40 Apr 29 2024 09:30:26
%S A177252 1,1,2,6,23,1,118,2,714,6,5016,24,40201,118,1,362163,714,3,3623772,
%T A177252 5016,12,39876540,40200,60,478639079,362163,357,1,6223394516,3623772,
%U A177252 2508,4,87138394540,39876540,20100,20,1307195547720,478639080,181080,120
%N A177252 Triangle read by rows: T(n,k) is the number of permutations of [n] having k adjacent 4-cycles (0 <= k <= floor(n/4)), i.e., having k cycles of the form (i, i+1, i+2, i+3).
%C A177252 Row n contains 1 + floor(n/4) entries.
%C A177252 Sum of entries in row n = n! (A000142).
%H A177252 Seiichi Manyama, <a href="/A177252/b177252.txt">Rows n = 0..200, flattened</a>
%H A177252 R. A. Brualdi and E. Deutsch, <a href="http://arxiv.org/abs/1005.0781">Adjacent q-cycles in permutations</a>, arXiv:1005.0781 [math.CO], 2010.
%F A177252 T(n,k) = Sum_{j=0..floor(n/4)} (-1)^(k+j)*binomial(j,k)*(n-3*j)!/j!.
%F A177252 T(n,0) = A177253(n).
%F A177252 Sum_{k>=0} k*T(n,k) = (n-3)! (n >= 4).
%F A177252 G.f. of column k: (1/k!) * Sum_{j>=k} j! * x^(j+3*k) / (1+x^4)^(j+1). - _Seiichi Manyama_, Feb 24 2024
%e A177252 T(9,2)=3 because we have (1234)(5678)(9), (1234)(5)(6789), and (1)(2345)(6789).
%e A177252 Triangle starts:
%e A177252      1;
%e A177252      1;
%e A177252      2;
%e A177252      6;
%e A177252     23,  1;
%e A177252    118,  2;
%e A177252    714,  6;
%e A177252   5016, 24;
%p A177252 T := proc (n, k) options operator, arrow: sum((-1)^(k+j)*binomial(j, k)*factorial(n-3*j)/factorial(j), j = 0 .. floor((1/4)*n)) end proc: for n from 0 to 15 do seq(T(n, k), k = 0 .. floor((1/4)*n)) end do; % yields sequence in triangular form
%t A177252 T[n_, k_]:= T[n, k]= Sum[(-1)^(k+j)*Binomial[j,k]*(n-3 j)!/j!, {j,0,n/4}];
%t A177252 Table[T[n, k], {n, 0, 15}, {k, 0, n/4}] // Flatten (* _Jean-François Alcover_, Nov 17 2017 *)
%o A177252 (Magma)
%o A177252 A177252:= func< n,k | (&+[(-1)^j*Factorial(n-3*k-3*j)/(Factorial(k) *Factorial(j)): j in [0..Floor((n-4*k)/4)]]) >;
%o A177252 [A177252(n,k): k in [0..Floor(n/4)], n in [0..20]]; // _G. C. Greubel_, Apr 28 2024
%o A177252 (SageMath)
%o A177252 def A177252(n,k): return sum((-1)^j*factorial(n-3*k-3*j)/(factorial(k) *factorial(j)) for j in range(1+(n-4*k)//4))
%o A177252 flatten([[A177252(n,k) for k in range(1+n//4)] for n in range(21)]) # _G. C. Greubel_, Apr 28 2024
%Y A177252 Columns k=0-3 give A177253, A369098, A370652, A370653.
%Y A177252 Cf. A000166, A008290, A177248, A177249, A177250, A177251.
%Y A177252 Cf. A000142 (row sums).
%K A177252 nonn,tabf
%O A177252 0,3
%A A177252 _Emeric Deutsch_, May 07 2010