%I #15 Sep 07 2020 05:59:54
%S 1,1,1,1,2,3,3,4,7,8,10,14,18,22,29,37,47,58,73,91,113,140,174,211,
%T 260,319,386,468,572,687,828,998,1197,1431,1714,2041,2430,2887,3424,
%U 4051,4792,5651,6659,7829,9199,10786,12631,14770,17258,20120,23444,27278
%N Number of partitions of n with equal number of parts congruent to each of 0 and 2 (mod 3).
%H Alois P. Heinz, <a href="/A035535/b035535.txt">Table of n, a(n) for n = 0..1000</a>
%p b:= proc(n, i, c) option remember; `if`(n=0,
%p `if`(c=0, 1, 0), `if`(i<1, 0, b(n, i-1, c)+
%p b(n-i, min(n-i, i), c+[1, 0, -1][1+irem(i, 3)])))
%p end:
%p a:= n-> b(n$2, 0):
%p seq(a(n), n=0..70); # _Alois P. Heinz_, Sep 04 2020
%t 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 *)
%K nonn
%O 0,5
%A _Olivier Gérard_
%E More terms from _David W. Wilson_