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.

A072705 Triangle of number of unimodal compositions of n into exactly k distinct terms.

This page as a plain text file.
%I A072705 #19 Mar 29 2020 16:29:53
%S A072705 1,1,0,1,2,0,1,2,0,0,1,4,0,0,0,1,4,4,0,0,0,1,6,4,0,0,0,0,1,6,8,0,0,0,
%T A072705 0,0,1,8,12,0,0,0,0,0,0,1,8,16,8,0,0,0,0,0,0,1,10,20,8,0,0,0,0,0,0,0,
%U A072705 1,10,28,16,0,0,0,0,0,0,0,0,1,12,32,24,0,0,0,0,0,0,0,0,0,1,12,40,40,0,0,0,0,0,0,0,0,0,0
%N A072705 Triangle of number of unimodal compositions of n into exactly k distinct terms.
%C A072705 Also the number of compositions of n into exactly k distinct terms whose negation is unimodal. - _Gus Wiseman_, Mar 06 2020
%H A072705 Alois P. Heinz, <a href="/A072705/b072705.txt">Rows n = 1..141, flattened</a>
%F A072705 T(n,k) = 2^(k-1)*A060016(n,k) = T(n-k,k)+2*T(n-k,k-1) [starting with T(0,0)=0, T(0,1)=0 and T(n,1)=1 for n>0].
%e A072705 Rows start: 1; 1,0; 1,2,0; 1,2,0,0; 1,4,0,0,0; 1,4,4,0,0,0; 1,6,4,0,0,0,0; 1,6,8,0,0,0,0,0; etc. T(6,3)=4 since 6 can be written as 1+2+3, 1+3+2, 2+3+1, or 3+2+1 but not 2+1+3 or 3+1+2.
%e A072705 From _Gus Wiseman_, Mar 06 2020: (Start)
%e A072705 Triangle begins:
%e A072705   1
%e A072705   1  0
%e A072705   1  2  0
%e A072705   1  2  0  0
%e A072705   1  4  0  0  0
%e A072705   1  4  4  0  0  0
%e A072705   1  6  4  0  0  0  0
%e A072705   1  6  8  0  0  0  0  0
%e A072705   1  8 12  0  0  0  0  0  0
%e A072705   1  8 16  8  0  0  0  0  0  0
%e A072705   1 10 20  8  0  0  0  0  0  0  0
%e A072705   1 10 28 16  0  0  0  0  0  0  0  0
%e A072705   1 12 32 24  0  0  0  0  0  0  0  0  0
%e A072705   1 12 40 40  0  0  0  0  0  0  0  0  0  0
%e A072705   1 14 48 48 16  0  0  0  0  0  0  0  0  0  0
%e A072705 (End)
%p A072705 b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1,
%p A072705       expand(b(n, i-1) +`if`(i>n, 0, x*b(n-i, i-1)))))
%p A072705     end:
%p A072705 T:= n-> (p-> seq(coeff(p, x, i)*ceil(2^(i-1)), i=1..n))(b(n$2)):
%p A072705 seq(T(n), n=1..14);  # _Alois P. Heinz_, Mar 26 2014
%t A072705 b[n_, i_] := b[n, i] = If[n > i*(i+1)/2, 0, If[n == 0, 1, Expand[b[n, i-1] + If[i > n, 0, x*b[n-i, i-1]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i]* Ceiling[2^(i-1)], {i, 1, n}]][b[n, n]]; Table[T[n], {n, 1, 14}] // Flatten (* _Jean-François Alcover_, Feb 26 2015, after _Alois P. Heinz_ *)
%t A072705 unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
%t A072705 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{k}],UnsameQ@@#&&unimodQ[#]&]],{n,12},{k,n}] (* _Gus Wiseman_, Mar 06 2020 *)
%Y A072705 Cf. A060016, A072574, A072704. Row sums are A072706.
%Y A072705 Column k = 2 is A052928.
%Y A072705 Unimodal compositions are A001523.
%Y A072705 Unimodal sequences covering an initial interval are A007052.
%Y A072705 Strict compositions are A032020.
%Y A072705 Non-unimodal strict compositions are A072707.
%Y A072705 Unimodal compositions covering an initial interval are A227038.
%Y A072705 Numbers whose prime signature is not unimodal are A332282.
%Y A072705 Cf. A059204, A107429, A115981, A329398, A332285, A332286, A332578, A332870, A332874.
%K A072705 nonn,tabl,look
%O A072705 1,5
%A A072705 _Henry Bottomley_, Jul 04 2002