|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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):
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|