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!)
A239871 Number of strict partitions of n having 1 more even part than odd, so that there is at least one ordering of the parts in which the even and odd parts alternate, and the first and last terms are even. 7
0, 0, 1, 0, 1, 0, 1, 1, 1, 2, 1, 4, 1, 6, 1, 9, 2, 12, 3, 16, 6, 20, 10, 25, 17, 30, 26, 36, 40, 43, 57, 51, 81, 61, 110, 74, 148, 91, 193, 113, 250, 144, 316, 184, 397, 239, 491, 311, 603, 407, 732, 530, 885, 692, 1061, 895, 1268, 1155, 1508, 1478, 1790 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,10
COMMENTS
Let c(n) be the number of strict partitions (that is, every part has multiplicity 1) of n having 1 more odd part than even, so that there is an ordering of parts for which the odd and even parts alternate and the first and last terms are odd. Then c(n) = a(n+1) for n >= 0.
LINKS
FORMULA
a(n) = [x^n y^(-1)] Product_{i>=1} 1+x^i*y^(2*(i mod 2)-1). - Alois P. Heinz, Apr 03 2014
EXAMPLE
a(11) counts these 4 partitions: 812, 614, 632, 452.
MAPLE
b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or
abs(t)>n, 0, `if`(n=0, 1, b(n, i-1, t)+
`if`(i>n, 0, b(n-i, i-1, t+(2*irem(i, 2)-1)))))
end:
a:= n-> b(n$2, 1):
seq(a(n), n=0..80); # Alois P. Heinz, Apr 02 2014
MATHEMATICA
d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
p[n_] := p[n] = Select[d[n], Count[#, _?OddQ] == -1 + Count[#, _?EvenQ] &]; t = Table[p[n], {n, 0, 20}]
TableForm[t] (* shows the partitions *)
u = Table[Length[p[n]], {n, 0, 70}] (* A239871 *)
(* Peter J. C. Moses, Mar 10 2014 *)
b[n_, i_, t_] := b[n, i, t] = If[n > i*(i + 1)/2 || Abs[t] > n, 0, If[n == 0, 1, b[n, i - 1, t] + If[i > n, 0, b[n - i, i - 1, t + (2*Mod[i, 2] - 1)]]]]; a[n_] := b[n, n, 1]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Nov 16 2015, after Alois P. Heinz *)
CROSSREFS
Column k=-1 of A240021.
Sequence in context: A130758 A130892 A353318 * A147389 A147008 A147365
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 29 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 April 20 11:10 EDT 2024. Contains 371838 sequences. (Running on oeis4.)