|
|
A353401
|
|
Number of integer compositions of n with all prime run-lengths.
|
|
9
|
|
|
1, 0, 1, 1, 1, 1, 4, 3, 6, 9, 10, 18, 27, 35, 54, 83, 107, 176, 242, 354, 515, 774, 1070, 1648, 2332, 3429, 4984, 7326, 10521, 15591, 22517, 32908, 48048, 70044, 101903, 149081, 216973, 316289, 461959, 672664, 981356, 1431256, 2086901, 3041577, 4439226, 6467735
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
LINKS
|
|
|
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):
|
|
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 parts instead of run-lengths is A023360, both A353429.
The version for partitions is A055923.
A005811 counts runs in binary expansion.
A008466 counts compositions with some part > 2.
A167606 counts compositions with adjacent parts coprime.
Cf. A078012, A165413, A175413, A274174, A333381, A333755, A353390, A353391, A353392, A353402, A353403.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|