A308809 Sum of all the parts in the partitions of n into 4 primes.
0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 10, 22, 24, 26, 42, 30, 48, 51, 72, 76, 120, 63, 132, 115, 168, 125, 234, 135, 308, 203, 330, 217, 416, 198, 476, 315, 540, 296, 684, 351, 840, 410, 798, 473, 1056, 450, 1196, 564, 1248, 637, 1500, 612, 1768, 795, 1782, 880
Offset: 0
Keywords
Programs
-
Mathematica
Table[n*Sum[Sum[Sum[(PrimePi[k] - PrimePi[k - 1])*(PrimePi[j] - PrimePi[j - 1]) (PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i - j - k] - PrimePi[n - i - j - k - 1]), {i, j, Floor[(n - j - k)/2]}], {j, k, Floor[(n - k)/3]}], {k, Floor[n/4]}], {n, 0, 50}] Table[Total[Flatten[Select[IntegerPartitions[n,{4}],AllTrue[#,PrimeQ]&]]],{n,0,60}] (* Harvey P. Dale, Sep 28 2024 *)