OFFSET
0,4
MAPLE
b:= proc(n, i, c) option remember; `if`(n=0,
`if`(c=0, 1, 0), `if`(i<1, 0, b(n, i-1, c)+
b(n-i, min(n-i, i), c+[0, 1, -1][1+irem(i, 3)])))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..70); # Alois P. Heinz, Sep 04 2020
MATHEMATICA
equalQ[partit_] := Total[Switch[Mod[#, 3], 0, 0, 1, 1, 2, -1]& /@ partit] == 0; a[n_] := If[Mod[n, 3] != 0, 0, Select[IntegerPartitions[n], equalQ] // Length]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 71}] (* Jean-François Alcover, Dec 07 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved