OFFSET
0,3
COMMENTS
Here, a finite sequence is concave if each term (other than the first or last) is at least the average of the two adjacent terms. - Eric M. Schmidt, Sep 29 2013
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (3,1,2) are (-2,1). Then a(n) is the number of compositions of n with weakly decreasing differences. - Gus Wiseman, May 15 2019
LINKS
EXAMPLE
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)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], GreaterEqual@@Differences[#]&]], {n, 0, 15}] (* Gus Wiseman, May 15 2019 *)
PROG
(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
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
Pontus von Brömssen, May 07 2002
EXTENSIONS
Name edited by Gus Wiseman, May 15 2019
STATUS
approved