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.

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

This page as a plain text file.
%I A230695 #15 Mar 22 2021 15:00:12
%S A230695 1,1,2,6,24,109,11,588,132,3654,1386,26125,13606,589,209863,139714,
%T A230695 13303,1876502,1508756,243542,18441367,17429745,3953529,92159,
%U A230695 197776850,214536114,63334182,3354454,2297242583,2815529811,1020982869,93265537,28739304385
%N A230695 Number T(n,k) of permutations of [n] with exactly k (possibly overlapping) occurrences of the consecutive step pattern up, down, down, up; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-2)/3)), read by rows.
%H A230695 Alois P. Heinz, <a href="/A230695/b230695.txt">Rows n = 0..100, flattened</a>
%e A230695 T(5,1) = 11: 14325, 15324, 15423, 24315, 25314, 25413, 34215, 35214, 35412, 45213, 45312.
%e A230695 T(8,2) = 589: 14327658, 14328657, 14328756, ..., 78635412, 78645213, 78645312.
%e A230695 Triangle T(n,k) begins:
%e A230695 :  0 :        1;
%e A230695 :  1 :        1;
%e A230695 :  2 :        2;
%e A230695 :  3 :        6;
%e A230695 :  4 :       24;
%e A230695 :  5 :      109,       11;
%e A230695 :  6 :      588,      132;
%e A230695 :  7 :     3654,     1386;
%e A230695 :  8 :    26125,    13606,     589;
%e A230695 :  9 :   209863,   139714,   13303;
%e A230695 : 10 :  1876502,  1508756,  243542;
%e A230695 : 11 : 18441367, 17429745, 3953529, 92159;
%p A230695 b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
%p A230695       add(b(u-j, o+j-1, [1, 3, 4, 1][t]), j=1..u)+
%p A230695       add(b(u+j-1, o-j, 2)*`if`(t=4, x, 1), j=1..o)))
%p A230695     end:
%p A230695 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
%p A230695 seq(T(n), n=0..15);
%t A230695 b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Expand[
%t A230695      Sum[b[u - j, o + j - 1, {1, 3, 4, 1}[[t]]], {j, 1, u}] +
%t A230695      Sum[b[u + j - 1, o - j, 2]*If[t == 4, x, 1], {j, 1, o}]]];
%t A230695 T[n_] := CoefficientList[b[n, 0, 1], x];
%t A230695 T /@ Range[0, 15] // Flatten (* _Jean-François Alcover_, Mar 22 2021, after _Alois P. Heinz_ *)
%Y A230695 Column k=0 gives: A177519.
%Y A230695 Row sums give: A000142.
%Y A230695 Cf. A242783, A242784, A295987.
%K A230695 nonn,tabf
%O A230695 0,3
%A A230695 _Alois P. Heinz_, Oct 27 2013