login
A204389
Number of partitions of n into distinct composite parts.
7
1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 3, 2, 3, 1, 5, 3, 5, 4, 7, 4, 9, 7, 10, 9, 13, 10, 17, 14, 18, 18, 25, 22, 30, 27, 34, 36, 44, 40, 53, 52, 62, 65, 76, 74, 93, 95, 107, 113, 131, 133, 158, 164, 182, 195, 221, 229, 264, 276, 304, 329, 367, 383, 431
OFFSET
0,11
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000 (terms n = 0..250 from Reinhard Zumkeller)
FORMULA
G.f.: (1/(1 + x))*Product_{k>=1} (1 + x^k)/(1 + x^prime(k)). - Ilya Gutkovskiy, Dec 31 2016
G.f.: product_(i>=1) (1+x^A002808(i)). - R. J. Mathar, Mar 01 2023
EXAMPLE
a(10) = #{10, 6+4} = 2;
a(11) = #{ } = 0;
a(12) = #{12, 8+4} = 2;
a(13) = #{9+4} = 1;
a(14) = #{14, 10+4, 8+6} = 3;
a(15) = #{15, 9+6} = 2;
a(16) = #{16, 12+4, 10+6} = 3;
a(17) = #{9+8} = 1;
a(18) = #{18, 14+4, 12+6, 10+8, 8+6+4} = 5;
a(19) = #{15+4, 10+9, 9+6+4} = 3;
a(20) = #{20, 16+4, 14+6, 12+8, 10+6+4} = 5.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
b(n, i-1)+ `if`(i>n or isprime(i), 0, b(n-i, i-1))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..70); # Alois P. Heinz, May 29 2013
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<2, 0, b[n, i-1] + If[i>n || PrimeQ[i], 0, b[n-i, i-1]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Oct 22 2015, after Alois P. Heinz *)
PROG
(Haskell)
a204389 = p a002808_list where
p _ 0 = 1
p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 15 2012
STATUS
approved