A353400 Number of integer compositions of n with all run-lengths > 2.
1, 0, 0, 1, 1, 1, 2, 1, 2, 4, 4, 5, 11, 11, 14, 27, 29, 37, 61, 72, 97, 147, 181, 246, 368, 470, 632, 914, 1198, 1611, 2286, 3018, 4079, 5709, 7619, 10329, 14333, 19258, 26142, 36069, 48688, 66114, 90800, 122913, 167020, 228735, 310167, 421708, 576499, 782803
Offset: 0
Keywords
Examples
The a(7) = 1 through a(12) = 11 compositions: 1111111 2222 333 22222 1112222 444 11111111 111222 1111222 2222111 3333 222111 2221111 11111222 111333 111111111 1111111111 22211111 222222 11111111111 333111 11112222 22221111 111111222 111222111 222111111 111111111111
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Crossrefs
The = 2 version is A003242 aerated.
The version for partitions is A100405.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A106356 counts compositions by number of adjacent equal parts.
A274174 counts compositions with equal parts contiguous.
A329739 counts compositions with all distinct run-lengths.
Programs
-
Maple
b:= proc(n, h) option remember; `if`(n=0, 1, add( `if`(i<>h, add(b(n-i*j, i), j=3..n/i), 0), i=1..n/3)) end: a:= n-> b(n, 0): seq(a(n), n=0..50); # Alois P. Heinz, May 17 2022
-
Mathematica
Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n],!MemberQ[Length/@Split[#],1|2]&]],{n,0,15}]
Extensions
a(21)-a(49) from Alois P. Heinz, May 17 2022