Number of non-unimodal triples of distinct positive integers summing to n. 0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 8, 10, 14, 16, 20, 24, 28, 32, 38, 42, 48, 54, 60, 66, 74, 80, 88, 96, 104, 112, 122, 130, 140, 150, 160, 170, 182, 192, 204, 216, 228, 240, 254, 266, 280, 294, 308, 322, 338, 352, 368, 384, 400, 416, 434, 450, 468, 486, 504, 522 [0] Last updated: Oct 20 2020. For this entry, let: b(n) = Number of triples of distinct positive integers summing to n. d(n) = Number of unimodal triples of distinct positive integers summing to n. Number of 3-part strict compositions of n with the middle part less than the other two. A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. Non-unimodal compositions match the patterns (2,1,2), (2,1,3), or (3,1,2). Eric Weisstein's World of Mathematics, Unimodal Sequence a(n) = 2*A001399(n-6). a(n) = b(n) - d(n). 4*A001399(n-6) counts neither increasing nor decreasing strict triples. 6*A001399(n-6) counts strict triples. The a(6) = 2 through a(12) = 14 compositions: (2,1,3) (2,1,4) (2,1,5) (2,1,6) (2,1,7) (2,1,8) (2,1,9) (3,1,2) (4,1,2) (3,1,4) (3,1,5) (3,1,6) (3,1,7) (3,1,8) (4,1,3) (3,2,4) (3,2,5) (3,2,6) (3,2,7) (5,1,2) (4,2,3) (4,1,5) (4,1,6) (4,1,7) (5,1,3) (5,1,4) (4,2,5) (4,2,6) (6,1,2) (5,2,3) (5,2,4) (4,3,5) (6,1,3) (6,1,4) (5,1,6) (7,1,2) (6,2,3) (5,3,4) (7,1,3) (6,1,5) (8,1,2) (6,2,4) (7,1,4) (7,2,3) (8,1,3) (9,1,2) Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],UnsameQ@@#&&#[[3]]>#[[2]]<#[[1]]&]],{n,0,15}] - or -
Table[Sum[If[n-i-k>k&&n-i-k!=i,1,0],{k,1,n},{i,k+1,n}],{n,0,20}] b(n) counts 3-part strict compositions, ranked by A337453. d(n) counts the complement. A001840(n-4) is the not necessarily strict version. A072707 counts these compositions of any length. A337453 /\ A335373 ranks these compositions. A000212(n-1) counts unimodal 3-part compositions, ranked by A337459. A000217(n-2) counts 3-part compositions, ranked by A014311. A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions, ranked by A014612. A001399(n-6) = A069905(n-3) = A211540(n-1) counts 3-part strict partitions, ranked by A007304. More on unimodal compositions: - A001523 counts unimodal compositions. - A001840/A062781/A130518 count non-unimodal triples, ranked by A337460. - A007052 counts unimodal patterns. - A011782 and A332288 count unimodal permutations. - A059204 and A332671 count non-unimodal permutations. - A072706 counts unimodal strict compositions. - A115981 counts non-unimodal compositions, ranked by A332282 and A335373. - A328509 counts non-unimodal patterns. - A332669 counts non-co-unimodal compositions, ranked by A335374. Cf. A128012, A156040, A216652, A242771, A332286, A332743, A332834, A333149.