OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
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+[1, 0, -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, -1, 1, 0, 2, 1]& /@ partit] == 0; a[n_] := Select[IntegerPartitions[n] , equalQ] // Length; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 51}] (* Jean-François Alcover, Dec 07 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved