cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A326982 Total sum of composite parts in all partitions of n.

This page as a plain text file.
%I A326982 #22 Jun 07 2021 04:46:30
%S A326982 0,0,0,0,4,4,14,18,44,67,117,166,283,391,603,848,1250,1702,2442,3280,
%T A326982 4565,6094,8266,10878,14566,18970,24953,32255,41909,53619,68983,87542,
%U A326982 111496,140561,177436,222125,278425,346293,430951,533083,659268,810948,997322
%N A326982 Total sum of composite parts in all partitions of n.
%H A326982 Alois P. Heinz, <a href="/A326982/b326982.txt">Table of n, a(n) for n = 0..8000</a>
%F A326982 a(n) = A194545(n) - A000070(n-1), n >= 1.
%F A326982 a(n) = A066186(n) - A326958(n).
%e A326982 For n = 6 we have:
%e A326982 --------------------------------------
%e A326982 Partitions                Sum of
%e A326982 of 6                  composite parts
%e A326982 --------------------------------------
%e A326982 6 .......................... 6
%e A326982 3 + 3 ...................... 0
%e A326982 4 + 2 ...................... 4
%e A326982 2 + 2 + 2 .................. 0
%e A326982 5 + 1 ...................... 0
%e A326982 3 + 2 + 1 .................. 0
%e A326982 4 + 1 + 1 .................. 4
%e A326982 2 + 2 + 1 + 1 .............. 0
%e A326982 3 + 1 + 1 + 1 .............. 0
%e A326982 2 + 1 + 1 + 1 + 1 .......... 0
%e A326982 1 + 1 + 1 + 1 + 1 + 1 ...... 0
%e A326982 --------------------------------------
%e A326982 Total ..................... 14
%e A326982 So a(6) = 14.
%p A326982 b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, 0], b(n, i-1)+
%p A326982       (p-> p+[0, `if`(isprime(i), 0, p[1]*i)])(b(n-i, min(n-i, i))))
%p A326982     end:
%p A326982 a:= n-> b(n$2)[2]:
%p A326982 seq(a(n), n=0..50);  # _Alois P. Heinz_, Aug 13 2019
%t A326982 Table[Total[Select[Flatten[IntegerPartitions[n]],CompositeQ]],{n,0,50}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 19 2020 *)
%t A326982 b[n_, i_] := b[n, i] = If[n == 0 || i == 1, {1, 0}, b[n, i - 1] +
%t A326982      With[{p = b[n-i, Min[n-i, i]]}, p+{0, If[PrimeQ[i], 0, p[[1]]*i]}]];
%t A326982 a[n_] := b[n, n][[2]];
%t A326982 a /@ Range[0, 50] (* _Jean-François Alcover_, Jun 07 2021, after _Alois P. Heinz_ *)
%Y A326982 Cf. A000041, A002808, A066186, A073118, A194544, A194545, A199936, A326958, A326981.
%K A326982 nonn
%O A326982 0,5
%A A326982 _Omar E. Pol_, Aug 09 2019