OFFSET
0,7
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
EXAMPLE
The a(0) = 1 through a(9) = 9 compositions (empty column indicated by dot, 0 is the empty composition):
0 . 11 111 22 11111 33 11122 44 333
222 22111 1133 11133
1122 1111111 3311 33111
2211 11222 111222
22211 222111
112211 1111122
1112211
1122111
2211111
MAPLE
b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h, add(
`if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=1..n/2))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..60); # Alois P. Heinz, May 18 2022
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !MemberQ[Length/@Split[#], _?(!PrimeQ[#]&)]&]], {n, 0, 15}]
CROSSREFS
The case of runs equal to 2 is A003242 aerated.
The version for partitions is A055923.
A005811 counts runs in binary expansion.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A167606 counts compositions with adjacent parts coprime.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 15 2022
EXTENSIONS
a(21)-a(45) from Alois P. Heinz, May 18 2022
STATUS
approved