login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of partitions of n with equal number of parts congruent to each of 1 and 2 (mod 3)
1

%I #14 Sep 07 2020 06:00:28

%S 1,0,0,2,0,0,6,0,0,14,0,0,32,0,0,66,0,0,134,0,0,256,0,0,480,0,0,868,0,

%T 0,1540,0,0,2664,0,0,4536,0,0,7574,0,0,12474,0,0,20234,0,0,32428,0,0,

%U 51324,0,0,80388,0,0,124582,0,0,191310,0,0,291114,0,0,439394,0,0,657936,0,0

%N Number of partitions of n with equal number of parts congruent to each of 1 and 2 (mod 3)

%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+[0, 1, -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, 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 *)

%Y Trisection gives: A035592.

%K nonn

%O 0,4

%A _Olivier Gérard_

%E More terms from _David W. Wilson_