A365005 Number of ways to write 2 as a nonnegative linear combination of a strict integer partition of n.
0, 1, 1, 2, 1, 2, 4, 4, 5, 6, 9, 10, 13, 15, 19, 23, 28, 33, 40, 47, 56, 67, 78, 92, 108, 126, 146, 171, 198, 229, 264, 305, 350, 403, 460, 527, 603, 687, 781, 889, 1009, 1144, 1295, 1464, 1653, 1866, 2101, 2364, 2659, 2984, 3347, 3752, 4200, 4696, 5248, 5858
Offset: 0
Keywords
Examples
The a(6) = 4 ways: 0*5 + 2*1 0*4 + 1*2 0*3 + 0*2 + 2*1 0*3 + 1*2 + 0*1
Crossrefs
Programs
-
Mathematica
combs[n_,y_]:=With[{s=Table[{k,i},{k,y}, {i,0,Floor[n/k]}]}, Select[Tuples[s],Total[Times@@@#]==n&]]; Table[Length[Join@@Table[combs[2,ptn], {ptn,Select[IntegerPartitions[n], UnsameQ@@#&]}]],{n,0,30}]
Comments