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”).

A035534
Number of partitions of n with equal number of parts congruent to each of 0 and 1 (mod 3).
1
1, 0, 1, 0, 2, 1, 2, 3, 4, 4, 8, 7, 12, 13, 19, 22, 30, 35, 47, 54, 74, 85, 109, 131, 165, 194, 247, 289, 359, 427, 523, 617, 757, 889, 1078, 1272, 1529, 1799, 2154, 2529, 3013, 3528, 4187, 4894, 5779, 6748, 7937, 9241, 10844, 12599, 14724, 17089, 19912, 23048, 26801
OFFSET
0,5
LINKS
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)+
`if`(i>n, 0, b(n-i, i, c+irem(i+2, 3)-1))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..70); # Alois P. Heinz, Dec 07 2016
MATHEMATICA
equalQ[partit_] := Total[Switch[Mod[#, 3], 0, -1, 1, 1, 2, 0]& /@ partit] == 0; a[n_] := Select[IntegerPartitions[n], equalQ] // Length; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 54}] (* Jean-François Alcover, Dec 07 2016 *)
CROSSREFS
Sequence in context: A026833 A281544 A056882 * A241416 A082854 A086742
KEYWORD
nonn
EXTENSIONS
More terms from David W. Wilson
STATUS
approved