OFFSET
0,3
COMMENTS
Let the frequency of the largest summand be f1, the frequency of the next smaller summand be f2, etc. Then the sequence f1, f2, f3, ... alternates in parity.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
For example the partition 3,2,2,1 is counted since the frequency of 3 is 1; the frequency of 2 is 2; and the frequency of 1 is 1. So the sequence of frequencies is 1,2,1. Since the terms of this sequence are odd, even, odd this partition is counted.
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1, t) +add(`if`(irem(j+t, 2)=0, 0,
b(n-i*j, i-1, 1-t)), j=1..n/i)))
end:
a:= n-> `if`(n=0, 1, add(b(n$2, j), j=0..1)):
seq(a(n), n=0..80); # Alois P. Heinz, Aug 17 2014
MATHEMATICA
<<Combinatorica`;
For[n=1, n<=30, n++, count[n]=1;
p={n};
For[index=1, index <= PartitionsP[n]-1, index++,
p=NextPartition[p];
tally=Tally[p];
freq=Table[tally[[i]][[2]], {i, 1, Length[tally]}];
condition=True;
For[i=1, i<=Length[freq]-1, i++,
If[(EvenQ[freq[[i]]]&&EvenQ[freq[[i+1]]])||
((OddQ[freq[[i]]])&&OddQ[freq[[i+1]]]), condition=False]]
If[condition, count[n]++]];
];
Print[Table[count[i], {i, 1, n-1}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
David S. Newman, Aug 16 2014
EXTENSIONS
More terms from Alois P. Heinz, Aug 17 2014
STATUS
approved