A035539 Number of partitions of n with equal nonzero number of parts congruent to each of 1 and 2 (mod 3).
0, 0, 0, 1, 0, 0, 4, 0, 0, 11, 0, 0, 27, 0, 0, 59, 0, 0, 123, 0, 0, 241, 0, 0, 458, 0, 0, 838, 0, 0, 1498, 0, 0, 2608, 0, 0, 4459, 0, 0, 7473, 0, 0, 12339, 0, 0, 20058, 0, 0, 32197, 0, 0, 51027, 0, 0, 80003, 0, 0, 124092, 0, 0, 190683, 0, 0, 290322, 0, 0, 438392, 0, 0, 656681, 0, 0
Offset: 0
Keywords
Crossrefs
Cf. A035593.
Programs
-
Mathematica
equalQ[partit_] := With[{t = Total[Switch[Mod[#, 3], 0, {1, 0, 0}, 1, {0, 1, 0}, 2, {0, 0, 1}]& /@ partit]}, t[[2]] > 0 && t[[2]] == t[[3]]]; a[n_] := If[Mod[n, 3] != 0, 0, Select[IntegerPartitions[n], equalQ] // Length]; a[0] = 0; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 71}] (* Jean-François Alcover, Dec 07 2016 *)