login
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
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):
seq(a(n), n=0..70); # Alois P. Heinz, May 18 2022
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@PrimeQ/@#&&And@@PrimeQ/@Length/@Split[#]&]], {n, 0, 15}]
CROSSREFS
The first condition only is A023360, partitions A000607.
For partitions we have A351982, only run-lens A100405, only parts A008483.
The second condition only is A353401, partitions A055923.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A052284 counts compositions into nonprimes, partitions A002095.
A106356 counts compositions by number of adjacent equal parts.
A114901 counts compositions with no runs of length 1, ranked by A353427.
A329738 counts uniform compositions, partitions A047966.
Sequence in context: A378178 A355916 A309023 * A137585 A301344 A301579
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 16 2022
EXTENSIONS
a(26)-a(56) from Alois P. Heinz, May 18 2022
STATUS
approved