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.

A242820 Number T(n,k) of permutations of [n] with exactly k occurrences of the consecutive step pattern up, down, down, down; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/4)), read by rows.

This page as a plain text file.
%I A242820 #14 Mar 23 2021 16:13:13
%S A242820 1,1,2,6,24,116,4,672,48,4536,504,34944,5376,302896,59488,496,2916992,
%T A242820 697856,13952,30899616,8720448,296736,357080064,116109312,5812224,
%U A242820 4470310976,1645662912,110697408,349504,60269056512,24776769024,2114735616,17730048
%N A242820 Number T(n,k) of permutations of [n] with exactly k occurrences of the consecutive step pattern up, down, down, down; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/4)), read by rows.
%H A242820 Alois P. Heinz, <a href="/A242820/b242820.txt">Rows n = 0..140, flattened</a>
%e A242820 T(5,1) = 4: (1,5,4,3,2), (2,5,4,3,1), (3,5,4,2,1), (4,5,3,2,1).
%e A242820 Triangle T(n,k) begins:
%e A242820 :  0 :        1;
%e A242820 :  1 :        1;
%e A242820 :  2 :        2;
%e A242820 :  3 :        6;
%e A242820 :  4 :       24;
%e A242820 :  5 :      116,       4;
%e A242820 :  6 :      672,      48;
%e A242820 :  7 :     4536,     504;
%e A242820 :  8 :    34944,    5376;
%e A242820 :  9 :   302896,   59488,    496;
%e A242820 : 10 :  2916992,  697856,  13952;
%e A242820 : 11 : 30899616, 8720448, 296736;
%p A242820 b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
%p A242820       add(b(u-j, o+j-1, [1, 3, 4, 1][t])*`if`(t=4, x, 1), j=1..u)+
%p A242820       add(b(u+j-1, o-j, 2), j=1..o)))
%p A242820     end:
%p A242820 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
%p A242820 seq(T(n), n=0..15);
%t A242820 b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Expand[
%t A242820      Sum[b[u - j, o + j - 1, {1, 3, 4, 1}[[t]]]*If[t==4, x, 1], {j, 1, u}]+
%t A242820      Sum[b[u + j - 1, o - j, 2], {j, 1, o}]]];
%t A242820 T[n_] := CoefficientList[b[n, 0, 1], x];
%t A242820 T /@ Range[0, 15] // Flatten (* _Jean-François Alcover_, Mar 23 2021, after _Alois P. Heinz_ *)
%Y A242820 Column k=0 gives A177518.
%Y A242820 Row sums give: A000142.
%Y A242820 Cf. A242783, A242784, A295987.
%K A242820 nonn,tabf
%O A242820 0,3
%A A242820 _Alois P. Heinz_, May 23 2014