|
|
A353429
|
|
Number of integer compositions of n with all prime parts and all prime run-lengths.
|
|
4
|
|
|
1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 4, 0, 2, 2, 5, 4, 9, 1, 5, 12, 20, 11, 19, 18, 31, 43, 54, 37, 63, 95, 121, 124, 154, 178, 261, 353, 393, 417, 565, 770, 952, 1138, 1326, 1647, 2186, 2824, 3261, 3917, 4941, 6423, 7935, 9719, 11554, 14557, 18536, 23380, 27985
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
LINKS
|
|
|
EXAMPLE
|
The a(13) = 2 through a(16) = 9 compositions:
(22333) (77) (555) (3355)
(33322) (2255) (33333) (5533)
(5522) (222333) (22255)
(223322) (333222) (55222)
(2222222) (332233)
(2222233)
(2223322)
(2233222)
(3322222)
|
|
MAPLE
|
b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h and isprime(i),
add(`if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=2..n/2))
end:
a:= n-> b(n, 0):
|
|
MATHEMATICA
|
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@PrimeQ/@#&&And@@PrimeQ/@Length/@Split[#]&]], {n, 0, 15}]
|
|
CROSSREFS
|
A106356 counts compositions by number of adjacent equal parts.
A114901 counts compositions with no runs of length 1, ranked by A353427.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|