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.

A334774 Triangle read by rows: T(n,k) is the number of permutations of 2 indistinguishable copies of 1..n with exactly k local maxima.

This page as a plain text file.
%I A334774 #15 Jan 11 2021 23:39:03
%S A334774 1,3,3,9,57,24,27,705,1449,339,81,7617,48615,49695,7392,243,78357,
%T A334774 1290234,3650706,2234643,230217,729,791589,30630618,197457468,
%U A334774 314306943,128203119,9689934,2187,7944321,686779323,9080961729,30829608729,31435152267,9159564513,529634931
%N A334774 Triangle read by rows: T(n,k) is the number of permutations of 2 indistinguishable copies of 1..n with exactly k local maxima.
%C A334774 Also the number of permutations of 2 indistinguishable copies of 1..n with exactly k-1 peaks. A peak is an interior maximum.
%H A334774 Andrew Howroyd, <a href="/A334774/b334774.txt">Table of n, a(n) for n = 1..1275</a> (rows 1..50)
%F A334774 T(n,k) = F(2,n,k-1,0) where F(m,n,p,q) = Sum_{i=0..p} Sum_{j=0..min(m-i, q)} F(m, n-1, p-i, q-j+i) * binomial(m+2*(q-j)+1, 2*q+i-j+1) * binomial(q-j+i, i) * binomial(q+1, j) for n > 1 with F(m,1,0,q) = binomial(m-1, q), F(m,1,p,q) = 0 for p > 0.
%F A334774 A334776(n) = Sum_{k=1..n} (k-1)*T(n,k).
%F A334774 A334777(n) = Sum_{k=1..n} k*T(n,k).
%e A334774 Triangle begins:
%e A334774     1;
%e A334774     3,      3;
%e A334774     9,     57,       24;
%e A334774    27,    705,     1449,       339;
%e A334774    81,   7617,    48615,     49695,      7392;
%e A334774   243,  78357,  1290234,   3650706,   2234643,    230217;
%e A334774   729, 791589, 30630618, 197457468, 314306943, 128203119, 9689934;
%e A334774   ...
%e A334774 The T(2,1) = 3 permutations of 1122 with 1 local maxima are 1122, 1221, 2211.
%e A334774 The T(2,2) = 3 permutations of 1122 with 2 local maxima are 1212, 2112, 2121.
%e A334774 The T(2,1) = 3 permutations of 1122 with 0 peaks are 2211, 2112, 1122.
%e A334774 The T(2,2) = 3 permutations of 1122 with 1 peak are 2121, 1221, 1212.
%o A334774 (PARI)
%o A334774 PeaksBySig(sig, D)={
%o A334774   my(F(lev,p,q) = my(key=[lev,p,q], z); if(!mapisdefined(FC, key, &z),
%o A334774     my(m=sig[lev]); z = if(lev==1, if(p==0, binomial(m-1, q), 0), sum(i=0, p, sum(j=0, min(m-i, q), self()(lev-1, p-i, q-j+i) * binomial(m+2*(q-j)+1, 2*q+i-j+1) * binomial(q-j+i, i) * binomial(q+1, j) )));
%o A334774     mapput(FC, key, z)); z);
%o A334774   local(FC=Map());
%o A334774   vector(#D, i, F(#sig, D[i], 0));
%o A334774 }
%o A334774 Row(n)={ PeaksBySig(vector(n,i,2), [0..n-1]) }
%o A334774 { for(n=1, 8, print(Row(n))) }
%Y A334774 Columns k=1..6 are A000244(n-1), 3*A152494, 3*A152495, 3*A152496, 3*A152497, 3*A152498.
%Y A334774 Row sums are A000680.
%Y A334774 Main diagonal is A334775.
%Y A334774 The version for permutations of 1..n is A008303(n,k-1).
%Y A334774 Cf. A154283, A334773, A334776, A334777, A334778.
%K A334774 nonn,tabl
%O A334774 1,2
%A A334774 _Andrew Howroyd_, May 11 2020