login
The OEIS is supported by the many generous donors 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
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: A347462 A340589 A102463 * A371069 A056829 A211536
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 04:54 EDT 2024. Contains 374377 sequences. (Running on oeis4.)