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.

A070211 Number of compositions (ordered partitions) of n that are concave-down sequences.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, May 07 2002

Keywords

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

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)
		

Crossrefs

Cf. A000079, A001523 (weakly unimodal compositions), A069916, A175342, A320466, A325361 (concave-down partitions), A325545, A325546 (concave-up compositions), A325547, A325548, A325557.

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