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.

A232933 Number T(n,k) of permutations of [n] with exactly k (possibly overlapping, cyclic wrap-around) occurrences of the consecutive step pattern UDU (U=up, D=down); triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.

This page as a plain text file.
%I A232933 #27 Dec 19 2020 02:29:12
%S A232933 1,1,0,2,3,3,12,4,8,35,45,40,144,348,132,96,910,1862,1316,952,5976,
%T A232933 11600,14808,5760,2176,39942,100260,123606,63360,35712,306570,919270,
%U A232933 1069910,910650,343040,79360,2698223,8427243,11694397,10673641,4477440,1945856
%N A232933 Number T(n,k) of permutations of [n] with exactly k (possibly overlapping, cyclic wrap-around) occurrences of the consecutive step pattern UDU (U=up, D=down); triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.
%H A232933 Alois P. Heinz, <a href="/A232933/b232933.txt">Rows n = 0..200, flattened</a>
%e A232933 T(2,1) = 2: 12, 21 (the two U's of UDU overlap).
%e A232933 T(3,0) = 3: 132, 213, 321.
%e A232933 T(3,1) = 3: 123, 231, 312.
%e A232933 T(4,0) = 12: 1243, 1342, 1432, 2134, 2143, 2431, 3124, 3214, 3421, 4213, 4312, 4321.
%e A232933 T(4,1) = 4: 1234, 2341, 3412, 4123.
%e A232933 T(4,2) = 8: 1324, 1423, 2314, 2413, 3142, 3241, 4132, 4231.
%e A232933 Triangle T(n,k) begins:
%e A232933 :  0 :      1;
%e A232933 :  1 :      1;
%e A232933 :  2 :      0,      2;
%e A232933 :  3 :      3,      3;
%e A232933 :  4 :     12,      4,       8;
%e A232933 :  5 :     35,     45,      40;
%e A232933 :  6 :    144,    348,     132,     96;
%e A232933 :  7 :    910,   1862,    1316,    952;
%e A232933 :  8 :   5976,  11600,   14808,   5760,   2176;
%e A232933 :  9 :  39942, 100260,  123606,  63360,  35712;
%e A232933 : 10 : 306570, 919270, 1069910, 910650, 343040, 79360;
%p A232933 b:= proc(u, o, t) option remember; `if`(u+o=0,
%p A232933      `if`(t=2, x, 1), expand(
%p A232933       add(b(u+j-1, o-j, 2)*`if`(t=3, x, 1), j=1..o)+
%p A232933       add(b(u-j, o+j-1, `if`(t=2, 3, 1)), j=1..u)))
%p A232933     end:
%p A232933 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))
%p A232933         (`if`(n<2, 1, n* b(0, n-1, 1))):
%p A232933 seq(T(n), n=0..12);
%t A232933 b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, If[t == 2, x, 1], Expand[Sum[ b[u + j - 1, o - j, 2]*If[t == 3, x, 1], {j, 1, o}] + Sum[b[u - j, o + j - 1, If[t == 2, 3, 1]], {j, 1, u}]]];
%t A232933 T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]   [If[n < 2, 1, n*b[0, n - 1, 1]]];
%t A232933 T /@ Range[0, 12] // Flatten (* _Jean-François Alcover_, Dec 19 2020, after _Alois P. Heinz_ *)
%Y A232933 Column k=0 gives A232899.
%Y A232933 Row sums give A000142.
%Y A232933 T(2n,n) gives A009752(n) = 2n * A000182(n) for n>0.
%Y A232933 T(2n+1,n) gives (2n+1) * A024283(n) for n>0.
%Y A232933 Cf. A295987.
%K A232933 nonn,tabf
%O A232933 0,4
%A A232933 _Alois P. Heinz_, Dec 02 2013