A353429 Number of integer compositions of n with all prime parts and all prime run-lengths.
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
Keywords
Examples
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)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..4000
Crossrefs
Programs
-
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}]
Extensions
a(26)-a(56) from Alois P. Heinz, May 18 2022