A348588 Number of partitions of n into 3 parts with at least 1 prime part.
0, 0, 0, 0, 1, 2, 2, 4, 4, 6, 7, 8, 10, 12, 13, 17, 17, 19, 22, 25, 26, 31, 31, 36, 37, 42, 43, 49, 49, 56, 56, 64, 63, 72, 70, 80, 79, 87, 87, 99, 94, 107, 105, 116, 114, 126, 123, 139, 134, 148, 145, 158, 155, 173, 166, 184, 178, 195, 189, 211, 202, 222, 215, 236, 226, 250, 242
Offset: 0
Keywords
Programs
-
Maple
b:= proc(n, i, t) option remember; series( `if`(n=0, t, `if`(i<1, 0, expand(x*b(n-i, min(n-i, i), `if`(isprime(i), 1, t)))+b(n, i-1, t))), x, 4) end: a:= n-> coeff(b(n$2, 0), x, 3): seq(a(n), n=0..66); # Alois P. Heinz, Oct 24 2021
-
Mathematica
Table[Length@Select[IntegerPartitions[k,{3}],Or@@PrimeQ@#&],{k,0,66}] (* Giorgos Kalogeropoulos, Oct 24 2021 *)
Formula
a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} sign(c(i) + c(j) + c(n-i-j)), where c is the prime characteristic (A010051).