OFFSET
0,5
COMMENTS
For a given partition cn(i,n) means the number of its parts equal to i modulo n.
Short: 0 + 2 <= 1 and 0 + 2 <= 4 and 0 + 3 <= 1 and 0 + 3 <= 4 (ZBBAA).
MATHEMATICA
okQ[p_] := Module[{c},
c[k_] := c[k] = Count[Mod[p, 5], k];
c[0] + c[2] <= c[1] &&
c[0] + c[2] <= c[4] &&
c[0] + c[3] <= c[1] &&
c[0] + c[3] <= c[4]];
a[n_] := a[n] = Count[okQ /@ IntegerPartitions[n], True];
Table[Print[n, " ", a[n]]; a[n], {n, 1, 45}] (* Jean-François Alcover, Oct 10 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Oct 10 2024
STATUS
approved