A342231 Total sum of parts which are powers of 2 in all partitions of n.
0, 1, 4, 6, 17, 24, 43, 64, 115, 159, 247, 347, 513, 704, 1001, 1350, 1894, 2513, 3408, 4489, 5989, 7786, 10226, 13172, 17079, 21800, 27938, 35362, 44900, 56402, 70959, 88545, 110617, 137108, 170051, 209599, 258328, 316685, 388072, 473331, 577026, 700524, 849775, 1027167
Offset: 0
Keywords
Examples
For n = 4 we have: ------------------------------------ Partitions Sum of parts . which are powers of 2 ------------------------------------ 4 ..................... 4 3 + 1 ................. 1 2 + 2 ................. 4 2 + 1 + 1 ............. 4 1 + 1 + 1 + 1 ......... 4 ------------------------------------ Total ................ 17 So a(4) = 17.
Programs
-
Mathematica
nmax = 43; CoefficientList[Series[Sum[2^k x^(2^k)/(1 - x^(2^k)), {k, 0, Floor[Log[2, nmax]] + 1}]/Product[(1 - x^j), {j, 1, nmax}], {x, 0, nmax}], x] Table[Sum[(2^IntegerExponent[2 k, 2] - 1) PartitionsP[n - k], {k, 1, n}], {n, 0, 43}]