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.

A332296 Number of narrowly totally normal compositions of n.

Original entry on oeis.org

1, 1, 2, 4, 5, 7, 13, 23, 30, 63, 120, 209, 369, 651, 1198, 2174, 3896, 7023, 12699, 22941, 41565
Offset: 0

Views

Author

Gus Wiseman, Feb 15 2020

Keywords

Comments

A sequence is narrowly totally normal if either it is empty, a singleton (narrow), or it covers an initial interval of positive integers (normal) with narrowly totally normal run-lengths.
A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(0) = 1 through a(6) = 13 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (12)   (112)   (122)    (123)
                 (21)   (121)   (212)    (132)
                 (111)  (211)   (221)    (213)
                        (1111)  (1121)   (231)
                                (1211)   (312)
                                (11111)  (321)
                                         (1212)
                                         (1221)
                                         (2112)
                                         (2121)
                                         (11211)
                                         (111111)
For example, starting with the composition (1,1,2,3,1,1) and repeatedly taking run-lengths gives (1,1,2,3,1,1) -> (2,1,1,2) -> (1,2,1) -> (1,1,1) -> (3). The first four are normal and the last is a singleton, so (1,1,2,3,1,1) is counted under a(9).
		

Crossrefs

Normal compositions are A107429.
The wide version is A332279.
The wide recursive version (for partitions) is A332295.
The alternating version is A332296 (this sequence).
The strong version is A332336.
The co-strong version is (also) A332336.

Programs

  • Mathematica
    tinQ[q_]:=Or[Length[q]<=1,And[Union[q]==Range[Max[q]],tinQ[Length/@Split[q]]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],tinQ]],{n,0,10}]

Formula

For n > 1, a(n) = A332279(n) + 1.