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!)
A239240 Number of partitions of n into distinct parts for which (number of odd parts) <= (number of even parts). 10
1, 0, 1, 1, 1, 2, 2, 4, 2, 6, 4, 9, 6, 13, 10, 18, 15, 24, 24, 32, 35, 43, 51, 56, 72, 74, 100, 97, 136, 128, 183, 168, 241, 222, 315, 290, 408, 381, 522, 497, 664, 647, 839, 837, 1054, 1081, 1317, 1384, 1641, 1767, 2035, 2242, 2519, 2831, 3108, 3555, 3828 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
a(n) = Sum_{k<=0} A240021(n,k). - Alois P. Heinz, Apr 02 2014
LINKS
FORMULA
a(n) + A239242(n) = A000009(n) for n >=1.
EXAMPLE
a(7) = 4 counts these partitions: 61, 52, 43, 421.
MAPLE
b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
`if`(n=0, `if`(t<=0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..60); # Alois P. Heinz, Mar 15 2014
MATHEMATICA
z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] < Count[#, _?EvenQ] &]], {n, 0, z}] (* A239239 *)
Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] <= Count[#, _?EvenQ] &]], {n, 0, z}] (* A239240 *)
Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] == Count[#, _?EvenQ] &]], {n, 0, z}] (* A239241 *)
Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] > Count[#, _?EvenQ] &]], {n, 0, z}] (* A239242 *)
Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] >= Count[#, _?EvenQ] &]], {n, 0, z}] (* A239243 *)
(* Peter J. C. Moses, Mar 10 2014 *)
b[n_, i_, t_] := b[n, i, t] = If[n>i*(i+1)/2, 0, If[n==0, If[t <= 0, 1, 0], b[n, i-1, t] + If[i>n, 0, b[n-i, i-1, t+If[Mod[i, 2]==1, 1, -1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A028913 A185048 A240828 * A054929 A236628 A078429
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 13 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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)