OFFSET
0,5
COMMENTS
Each number in p is counted once, regardless of its multiplicity.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
a(6) counts these 7 partitions: 6, 42, 411, 321, 222, 2211, 21111.
MATHEMATICA
z = 30; f[n_] := f[n] = IntegerPartitions[n]; s0[p_] := Count[Mod[DeleteDuplicates[p], 2], 0];
s1[p_] := Count[Mod[DeleteDuplicates[p], 2], 1];
Table[Count[f[n], p_ /; 2 s0[p] < s1[p]], {n, 0, z}] (* A241651 *)
Table[Count[f[n], p_ /; 2 s0[p] <= s1[p]], {n, 0, z}] (* A241652 *)
Table[Count[f[n], p_ /; 2 s0[p] == s1[p]], {n, 0, z}] (* A241653 *)
Table[Count[f[n], p_ /; 2 s0[p] >= s1[p]], {n, 0, z}] (* A241654 *)
Table[Count[f[n], p_ /; 2 s0[p] > s1[p]], {n, 0, z}] (* A241655 *)
PROG
(PARI) a(n)={my(s=0); forpart(p=n, my(S=Set(p), k=#select(x->x%2==0, S)); if(3*k>=#S, s++)); s} \\ Andrew Howroyd, Mar 27 2025
(PARI) seq(n)={my(p=prod(k=1, n, 1 + if(k%2, y, 1/y^2)*(x^k/(1 - x^k)), 1 + O(x*x^n))); Vec(subst(p, y, 1)-sum(i=1, sqrtint(n), polcoef(p, i, y)))} \\ Andrew Howroyd, Dec 23 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 27 2014
EXTENSIONS
Name corrected by Andrew Howroyd, Mar 27 2025
STATUS
approved
