A347797 Number of compositions (ordered partitions) of n into at most 4 nonprime parts.
1, 1, 1, 1, 2, 2, 4, 6, 5, 10, 14, 15, 24, 21, 35, 45, 48, 65, 77, 89, 114, 129, 148, 184, 205, 239, 285, 310, 361, 410, 459, 522, 593, 636, 740, 804, 911, 969, 1123, 1169, 1350, 1428, 1595, 1687, 1926, 1974, 2270, 2325, 2611, 2726, 3064, 3120, 3547, 3596, 4012, 4155
Offset: 0
Keywords
Programs
-
Mathematica
Table[Length@Flatten[Permutations/@IntegerPartitions[n,4,Select[Range@n,!PrimeQ@#&]],1],{n,0,55}] (* Giorgos Kalogeropoulos, Sep 14 2021 *)