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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239243 Number of partitions of n into distinct parts for which (number of odd parts) >= (number of even parts). 6
1, 1, 0, 2, 1, 3, 2, 4, 4, 6, 7, 8, 11, 11, 17, 16, 25, 22, 36, 31, 49, 44, 68, 61, 90, 85, 120, 118, 156, 160, 204, 217, 261, 291, 337, 386, 429, 507, 548, 662, 694, 854, 882, 1096, 1112, 1396, 1406, 1765, 1768, 2219, 2223, 2776, 2784, 3451, 3484, 4275 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

a(n) = Sum_{k>=0} A240021(n,k). - Alois P. Heinz, Apr 02 2014

LINKS

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

FORMULA

a(n) + A239239(n) = A000009(n) for n >=1.

EXAMPLE

a(8) = 4 counts these partitions:  71, 53, 521, 431.

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

Cf. A239239, A239240, A239241, A239242, A000009.

Sequence in context: A116928 A239948 A034391 * A206738 A282971 A174618

Adjacent sequences:  A239240 A239241 A239242 * A239244 A239245 A239246

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 22 13:55 EST 2018. Contains 299454 sequences. (Running on oeis4.)