A070211 Number of compositions (ordered partitions) of n that are concave-down sequences.
1, 1, 2, 4, 6, 9, 14, 18, 24, 34, 42, 52, 68, 82, 101, 126, 147, 175, 213, 246, 289, 344, 392, 453, 530, 598, 687, 791, 885, 1007, 1151, 1276, 1438, 1629, 1806, 2018, 2262, 2490, 2775, 3091, 3387, 3754, 4165, 4542, 5011, 5527, 6012, 6600, 7245, 7864, 8614
Offset: 0
Examples
Out of the 8 ordered partitions of 4, only 2+1+1 and 1+1+2 are not concave, so a(4)=6. From _Gus Wiseman_, May 15 2019: (Start) The a(1) = 1 through a(6) = 14 compositions: (1) (2) (3) (4) (5) (6) (11) (12) (13) (14) (15) (21) (22) (23) (24) (111) (31) (32) (33) (121) (41) (42) (1111) (122) (51) (131) (123) (221) (132) (11111) (141) (222) (231) (321) (1221) (111111) (End)
Links
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Differences[#]&]],{n,0,15}] (* Gus Wiseman, May 15 2019 *)
-
Sage
def A070211(n) : return sum(all(2*p[i] >= p[i-1] + p[i+1] for i in range(1, len(p)-1)) for p in Compositions(n)) # Eric M. Schmidt, Sep 29 2013
Extensions
Name edited by Gus Wiseman, May 15 2019
Comments