%I #15 Nov 03 2015 03:18:46
%S 0,1,2,4,11,16,33,48,89,134,214,305,478,663,976,1356,1934,2617,3654,
%T 4877,6652,8808,11772,15386,20329,26308,34249,43987,56651,72079,92008,
%U 116171,146967,184381,231399,288398,359581,445426,551721,679868,837238,1026256
%N Total sum of nonprime parts in all partitions of n.
%H Alois P. Heinz, <a href="/A194545/b194545.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = A066186(n) - A073118(n).
%e For n = 6 we have:
%e --------------------------------------
%e . Sum of
%e Partitions nonprime parts
%e --------------------------------------
%e 6 .......................... 6
%e 3 + 3 ...................... 0
%e 4 + 2 ...................... 4
%e 2 + 2 + 2 .................. 0
%e 5 + 1 ...................... 1
%e 3 + 2 + 1 .................. 1
%e 4 + 1 + 1 .................. 6
%e 2 + 2 + 1 + 1 .............. 2
%e 3 + 1 + 1 + 1 .............. 3
%e 2 + 1 + 1 + 1 + 1 .......... 4
%e 1 + 1 + 1 + 1 + 1 + 1 ...... 6
%e --------------------------------------
%e Total ..................... 33
%e So a(6) = 33.
%p b:= proc(n, i) option remember; local h, j, t;
%p if n<0 then [0, 0]
%p elif n=0 then [1, 0]
%p elif i<1 then [0, 0]
%p else h:= [0, 0];
%p for j from 0 to iquo(n, i) do
%p t:= b(n-i*j, i-1);
%p h:= [h[1]+t[1], h[2]+t[2]+`if`(isprime(i), 0, t[1]*i*j)]
%p od; h
%p fi
%p end:
%p a:= n-> b(n, n)[2]:
%p seq(a(n), n=0..50); # _Alois P. Heinz_, Nov 20 2011
%t b[n_, i_] := b[n, i] = Module[{h, j, t}, Which[n<0, {0, 0}, n==0, {1, 0}, i < 1, {0, 0}, True, h = {0, 0}; For[j = 0, j <= Quotient[n, i], j++, t = b[n-i*j, i-1]; h = {h[[1]] + t[[1]], h[[2]] + t[[2]] + If[PrimeQ[i], 0, t[[1]]*i*j]}]; h]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Nov 03 2015, after _Alois P. Heinz_ *)
%Y Cf. A018252, A066186, A073118, A194544.
%K nonn
%O 0,3
%A _Omar E. Pol_, Nov 20 2011
%E More terms from _Alois P. Heinz_, Nov 20 2011
|