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.

A237996 Triangular array read by rows. T(n,k) is the number of even permutations of {1,2,...,n} that have exactly k cycles, n >= 0, 0 <= k <= n.

This page as a plain text file.
%I A237996 #31 May 16 2025 16:38:35
%S A237996 1,0,1,0,0,1,0,2,0,1,0,0,11,0,1,0,24,0,35,0,1,0,0,274,0,85,0,1,0,720,
%T A237996 0,1624,0,175,0,1,0,0,13068,0,6769,0,322,0,1,0,40320,0,118124,0,22449,
%U A237996 0,546,0,1,0,0,1026576,0,723680,0,63273,0,870,0,1
%N A237996 Triangular array read by rows. T(n,k) is the number of even permutations of {1,2,...,n} that have exactly k cycles, n >= 0, 0 <= k <= n.
%C A237996 Row sums = A001710(n).
%C A237996 If a permutation of {1, 2, ..., n} is written as a product of m disjoint cycles (where the fixed points of the permutation are viewed as 1-cycles) then the parity of the permutation is (-1)^(n-m). It is an even permutation if the number of cycles of even length is even (possibly zero), and it is an odd permutation if the number of cycles of even length is odd. - _Peter Bala_, Jun 25 2024
%D A237996 J. Riordan, Introduction to Combinatorial Analysis, Wiley, 1958, page 87, problem # 20.
%H A237996 Alois P. Heinz, <a href="/A237996/b237996.txt">Rows n = 0..140, flattened</a>
%H A237996 Wikipedia, <a href="https://en.wikipedia.org/wiki/Parity_of_a_permutation">Parity of a permutaion</a>
%F A237996 E.g.f.: exp(y*A(x))*cosh(y*B(x)) where A(x) = log(((1 + x)/(1 - x))^(1/2)) and B(x) = log((1/(1-x^2))^(1/2)).
%F A237996 From _Peter Bala_, Jun 25 2024: (Start)
%F A237996 If n and k are both even or both odd, then T(n, k) is equal to the Stirling cycle number |s(n, k)| = A132393(n, k), and 0 otherwise.
%F A237996 n-th row polynomial R(n, x) = (1/2)*( x*(x + 1)*...*(x + n + 1) + x*(x - 1)*...*(x - n - 1) ).
%F A237996 For n >= 1, the zeros of R(n, x) are purely imaginary. (End)
%e A237996 Triangle begins:
%e A237996   1;
%e A237996   0,     1;
%e A237996   0,     0,       1;
%e A237996   0,     2,       0,      1;
%e A237996   0,     0,      11,      0,      1;
%e A237996   0,    24,       0,     35,      0,     1;
%e A237996   0,     0,     274,      0,     85,     0,     1;
%e A237996   0,   720,       0,   1624,      0,   175,     0,   1;
%e A237996   0,     0,   13068,      0,   6769,     0,   322,   0,   1;
%e A237996   0, 40320,       0, 118124,      0, 22449,     0, 546,   0, 1;
%e A237996   0,     0, 1026576,      0, 723680,     0, 63273,   0, 870, 0, 1;
%e A237996   ...
%p A237996 with(combinat):
%p A237996 b:= proc(n, i, t) option remember; expand(`if`(n=0, t, `if`(i<1,
%p A237996       0, add(x^j*multinomial(n, n-i*j, i$j)*(i-1)!^j/j!*b(n-i*j,
%p A237996       i-1, irem(t+`if`(irem(i,2)=0, j, 0), 2)), j=0..n/i))))
%p A237996     end:
%p A237996 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 1)):
%p A237996 seq(T(n), n=0..12);  # _Alois P. Heinz_, Mar 09 2015
%p A237996 # Alternative:
%p A237996 A132393 := (n, k) -> abs(Stirling1(n, k)):
%p A237996 T := (n, k) -> ifelse((n::even and k::even) or (n::odd and k::odd), A132393(n, k),
%p A237996 0): seq(seq(T(n, k), k = 0..n), n = 0..9);  # _Peter Luschny_, Jun 26 2024
%t A237996 nn=11;a=Log[((1+x)/(1-x))^(1/2)];b=Log[1/(1-x^2)^(1/2)];Table[Take[(Range[0,nn]!CoefficientList[Series[Exp[y a]Cosh[y b] ,{x,0,nn}],{x,y}])[[n]],n],{n,1,nn}]//Grid
%Y A237996 Cf. A008275, A130534, A132393, A164652.
%K A237996 nonn,tabl
%O A237996 0,8
%A A237996 _Geoffrey Critzer_, Feb 16 2014