A347739 Number of compositions (ordered partitions) of n into at most 2 prime parts.
1, 0, 1, 1, 1, 3, 1, 3, 2, 2, 3, 1, 2, 3, 3, 2, 4, 1, 4, 3, 4, 2, 5, 1, 6, 2, 5, 0, 4, 1, 6, 3, 4, 2, 7, 0, 8, 1, 3, 2, 6, 1, 8, 3, 6, 2, 7, 1, 10, 2, 8, 0, 6, 1, 10, 2, 6, 0, 7, 1, 12, 3, 5, 2, 10, 0, 12, 1, 4, 2, 10, 1, 12, 3, 9, 2, 10, 0, 14, 1, 8
Offset: 0
Keywords
Programs
-
Mathematica
Table[Length@Flatten[Permutations/@IntegerPartitions[n,2,Prime@Range@PrimePi@n],1],{n,0,100}] (* Giorgos Kalogeropoulos, Sep 12 2021 *)
Formula
a(n) = Sum_{k=1..2} A121303(n,k) for n >= 2. - Alois P. Heinz, Sep 11 2021