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.

A263789 Triangle read by rows: T(n,k) (n>=0, 0<=k<=floor(n/2)) is the number of permutations of n and k valleys (considered cyclically).

This page as a plain text file.
%I A263789 #39 May 13 2020 19:21:11
%S A263789 1,1,0,2,0,6,0,16,8,0,40,80,0,96,528,96,0,224,2912,1904,0,512,14592,
%T A263789 23040,2176,0,1152,69120,221184,71424,0,2560,316160,1858560,1372160,
%U A263789 79360,0,5632,1413632,14353152,20252672,3891712,0,12288,6223872,104742912
%N A263789 Triangle read by rows: T(n,k) (n>=0, 0<=k<=floor(n/2)) is the number of permutations of n and k valleys (considered cyclically).
%C A263789 Conjecture: column k > 0 is asymptotic to n * 2^(n-2*k) * k^(n-1). - _Vaclav Kotesovec_, Oct 26 2015
%H A263789 Alois P. Heinz, <a href="/A263789/b263789.txt">Rows n = 0..200, flattened</a>
%H A263789 FindStat - Combinatorial Statistic Finder, <a href="http://www.findstat.org/StatisticsDatabase/St000243">The number of cyclic valleys and cyclic peaks of a permutation</a>.
%F A263789 T(n,k) = n*A008303(n-1, k-1) for n > 1. - _Andrew Howroyd_, May 13 2020
%e A263789 Triangle begins:
%e A263789   1;
%e A263789   1;
%e A263789   0,  2;
%e A263789   0,  6;
%e A263789   0, 16,   8;
%e A263789   0, 40,  80;
%e A263789   0, 96, 528, 96;
%e A263789   ...
%p A263789 b:= proc(u, o, t) option remember; expand(`if`(u+o=0, x,
%p A263789       add(b(u-j, o+j-1, 0), j=1..u)*`if`(min(t, n)>0, x, 1)+
%p A263789       add(b(u+j-1, o-j, 1), j=1..o)))
%p A263789     end:
%p A263789 T:= n-> `if`(n<2, 1, (p-> seq(n*coeff(p, x, i)
%p A263789         , i=0..degree(p)))(b(n-1, 0$2))):
%p A263789 seq(T(n), n=0..14);  # _Alois P. Heinz_, Oct 28 2015
%t A263789 b[u_, o_, t_] := b[u, o, t] = Expand[If[u+o == 0, x, Sum[b[u-j, o+j-1, 0], {j, 1, u}]*If[Min[t, n] > 0, x, 1] + Sum[b[u+j-1, o-j, 1], {j, 1, o}]]]; T[n_] := If[n<2, 1, Function[p, Table[n*Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n-1, 0, 0]]]; Table[T[n], {n, 0, 14}] // Flatten (* _Jean-François Alcover_, Jan 24 2017, after _Alois P. Heinz_ *)
%Y A263789 Columns k=1-6 give: A057711 (for n>1), A159710, A159711, A159712, A159713, A159714.
%Y A263789 Row sums give A000142.
%Y A263789 Cf. A000142, A008303.
%K A263789 nonn,tabf
%O A263789 0,4
%A A263789 _Christian Stump_, Oct 26 2015
%E A263789 More terms from _Alois P. Heinz_, Oct 26 2015