login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242110 Number of partitions of n whose different summands alternate in parity. 1
1, 1, 2, 3, 4, 6, 8, 11, 13, 21, 23, 33, 39, 54, 63, 88, 98, 132, 157, 200, 237, 303, 356, 440, 526, 643, 767, 931, 1103, 1317, 1581, 1860, 2215, 2615, 3100, 3631, 4302, 4999, 5907, 6865, 8059, 9322, 10950, 12613, 14744, 16988, 19756, 22694, 26344, 30192 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

If the largest part is even (odd ), then the second largest part must be odd (even), the third largest part even (odd),...

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

Shane Chern, Unlimited parity alternating partitions, arXiv:1803.01031 [math.CO], 2018.

EXAMPLE

The first of the unrestricted partitions not to be counted is 3+1, because the largest part, 3, is odd and the next largest part, 1, is also odd.

MAPLE

b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,

      b(n, i-1, t) +`if`(irem(i+t, 2)=0, 0,

      add(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<=20, n++, count[n]=1;

p={n};

For[index=1, index<=PartitionsP[n]-1, index++,

p=NextPartition[p];

condition=True;

For[i=1, i<=Length[p]-1, i++,

If[((p[[i]]!=p[[i+1]])&&EvenQ[p[[i]]]&&EvenQ[p[[i+1]]])||

((p[[i]]!=p[[i+1]]&&OddQ[p[[i]]])&&OddQ[p[[i+1]]]), condition=False]];

If[condition, count[n]++]];

];

Print[Table[count[i], {i, 1, n-1}]]

CROSSREFS

Sequence in context: A211522 A105799 A102463 * A056829 A211536 A071764

Adjacent sequences:  A242107 A242108 A242109 * A242111 A242112 A242113

KEYWORD

nonn

AUTHOR

David S. Newman, Aug 15 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 October 14 01:36 EDT 2019. Contains 327994 sequences. (Running on oeis4.)