login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242984 Number of partitions of n where the frequencies alternate in parity. 1
1, 1, 2, 2, 4, 4, 6, 7, 11, 12, 15, 19, 26, 30, 37, 42, 58, 64, 82, 92, 120, 129, 167, 181, 241, 252, 326, 346, 450, 474, 606, 641, 822, 863, 1088, 1146, 1454, 1526, 1898, 2010, 2494, 2638, 3232, 3437, 4195, 4458, 5381, 5748, 6928, 7389, 8805, 9446, 11217 (list; graph; refs; listen; history; text; internal format)
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

Sequence in context: A067772 A078374 A341697 * A027590 A007212 A027595

Adjacent sequences:  A242981 A242982 A242983 * A242985 A242986 A242987

KEYWORD

nonn

AUTHOR

David S. Newman, Aug 16 2014

EXTENSIONS

More terms from Alois P. Heinz, Aug 17 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 11 14:58 EDT 2021. Contains 342886 sequences. (Running on oeis4.)