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.

A187244 Triangle read by rows: T(n,k) is the number of permutations of [n] having k cycles with 2 alternating runs (it is assumed that the smallest element of the cycle is in the first position), 0<=k<=floor(n/3).

This page as a plain text file.
%I A187244 #12 May 03 2017 07:51:35
%S A187244 1,1,2,5,1,17,7,78,42,463,247,10,3315,1550,175,27164,11049,2107,
%T A187244 247975,92596,22029,280,2492539,906427,220734,9100,27422698,10044963,
%U A187244 2264724,184415,328607417,122314296,25036462,3028025,15400,4266367567,1607778568,307273681,44800184,800800
%N A187244 Triangle read by rows: T(n,k) is the number of permutations of [n] having k cycles with 2 alternating runs (it is assumed that the smallest element of the cycle is in the first position), 0<=k<=floor(n/3).
%C A187244 Number of entries in row n is 1+floor(n/3).
%C A187244 Sum of entries in row n is n!.
%C A187244 T(n,0)=A187245(n).
%C A187244 Sum(k*T(n,k), k>=0) = A187246(n).
%H A187244 Alois P. Heinz, <a href="/A187244/b187244.txt">Rows n = 0..200, flattened</a>
%F A187244 E.g.f.: G(t,z) = exp[(1/4)(t-1)(2z-4exp(z)+exp(2z)+3)]/(1-z).
%F A187244 The 4-variate g.f. H(u,v,w,z) (exponential with respect z), where u marks number of cycles with 1 alternating run, v marks number of cycles with 2 alternating runs, w marks the number of all cycles, and z marks the size of the permutation, is given by
%F A187244 H(u,v,w,z)=exp[(1/4)w((v-1)(exp(2z)+2z)+4(u-v)exp(z)+1-4u+3v)]/(1-z)^w.
%F A187244 We have G(t,z)=H(1,t,1,z).
%e A187244 T(4,1)=7 because we have (132)(4), (142)(3), (1)(243), (143)(2), (1432), (1243), and (1342).
%e A187244 Triangle starts:
%e A187244 1;
%e A187244 1;
%e A187244 2;
%e A187244 5,1;
%e A187244 17,7;
%e A187244 78,42;
%e A187244 463, 247, 10;
%p A187244 G := exp((1/4)*(t-1)*(2*z-4*exp(z)+exp(2*z)+3))/(1-z): Gser := simplify(series(G, z = 0, 15)): for n from 0 to 13 do P[n] := sort(expand(factorial(n)*coeff(Gser, z, n))) end do: for n from 0 to 13 do seq(coeff(P[n], t, k), k = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form
%p A187244 # second Maple program:
%p A187244 b:= proc(n) option remember; expand(
%p A187244       `if`(n=0, 1, add(b(n-j)*binomial(n-1, j-1)*
%p A187244       `if`(j=1, 1, (j-1)!+(2^(j-2)-1)*(x-1)), j=1..n)))
%p A187244     end:
%p A187244 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
%p A187244 seq(T(n), n=0..14);  # _Alois P. Heinz_, Apr 15 2017
%t A187244 b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n - j]*Binomial[n - 1, j - 1]* If[j == 1, 1, (j - 1)! + (2^(j - 2) - 1)*(x - 1)], {j, 1, n}]]];
%t A187244 T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n]];
%t A187244 Table[T[n], {n, 0, 14}] // Flatten (* _Jean-François Alcover_, May 03 2017, after _Alois P. Heinz_ *)
%Y A187244 Cf. A187245, A187246.
%K A187244 nonn,tabf
%O A187244 0,3
%A A187244 _Emeric Deutsch_, Mar 07 2011