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

A035535
Number of partitions of n with equal number of parts congruent to each of 0 and 2 (mod 3).
1
1, 1, 1, 1, 2, 3, 3, 4, 7, 8, 10, 14, 18, 22, 29, 37, 47, 58, 73, 91, 113, 140, 174, 211, 260, 319, 386, 468, 572, 687, 828, 998, 1197, 1431, 1714, 2041, 2430, 2887, 3424, 4051, 4792, 5651, 6659, 7829, 9199, 10786, 12631, 14770, 17258, 20120, 23444, 27278
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)+
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
Sequence in context: A114863 A152980 A170891 * A154309 A249579 A329301
KEYWORD
nonn
EXTENSIONS
More terms from David W. Wilson
STATUS
approved