OFFSET
0,8
MAPLE
b := proc(n, i, t, s) option remember; `if`(n=0,
`if`(t = s and t >= 1, 1, 0), `if`(i<1, 0, b(n, i-1, t, s)+
b(n-i, min(n-i, i), t + [1, 0, 0][1+irem(i, 3)], s + [0, 1, 0][1+irem(i, 3)])))
end:
seq(b(n, n, 0, 0), n=0..50); # Georg Fischer, Sep 13 2020
MATHEMATICA
equalQ[partit_] := With[{t = Total[Switch[Mod[#, 3], 0, {1, 0, 0}, 1, {0, 1, 0}, 2, {0, 0, 1}]& /@ partit]}, t[[1]] > 0 && t[[1]] == t[[2]]]; a[n_] := Select[IntegerPartitions[n], equalQ] // Length; a[0] = 0; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 54}] (* Jean-François Alcover, Dec 07 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved