A332296 Number of narrowly totally normal compositions of n.
1, 1, 2, 4, 5, 7, 13, 23, 30, 63, 120, 209, 369, 651, 1198, 2174, 3896, 7023, 12699, 22941, 41565
Offset: 0
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
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.
Comments