cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239243 Number of partitions of n into distinct parts for which (number of odd parts) >= (number of even parts).

This page as a plain text file.
%I A239243 #14 Aug 30 2016 03:53:07
%S A239243 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,
%T A239243 120,118,156,160,204,217,261,291,337,386,429,507,548,662,694,854,882,
%U A239243 1096,1112,1396,1406,1765,1768,2219,2223,2776,2784,3451,3484,4275
%N A239243 Number of partitions of n into distinct parts for which (number of odd parts) >= (number of even parts).
%C A239243 a(n) = Sum_{k>=0} A240021(n,k). - _Alois P. Heinz_, Apr 02 2014
%H A239243 Alois P. Heinz, <a href="/A239243/b239243.txt">Table of n, a(n) for n = 0..1000</a>
%F A239243 a(n) + A239239(n) = A000009(n) for n >=1.
%e A239243 a(8) = 4 counts these partitions:  71, 53, 521, 431.
%p A239243 b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
%p A239243      `if`(n=0, `if`(t>=0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
%p A239243       b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
%p A239243     end:
%p A239243 a:= n-> b(n$2, 0):
%p A239243 seq(a(n), n=0..60);  # _Alois P. Heinz_, Mar 15 2014
%t A239243 z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
%t A239243 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] < Count[#, _?EvenQ] &]], {n, 0, z}] (* A239239 *)
%t A239243 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] <= Count[#, _?EvenQ] &]], {n, 0, z}] (* A239240 *)
%t A239243 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] == Count[#, _?EvenQ] &]], {n, 0, z}] (* A239241 *)
%t A239243 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] > Count[#, _?EvenQ] &]], {n, 0, z}] (* A239242 *)
%t A239243 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] >= Count[#, _?EvenQ] &]], {n, 0, z}] (* A239243 *)
%t A239243 (* _Peter J. C. Moses_, Mar 10 2014 *)
%t A239243 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_ *)
%Y A239243 Cf. A239239, A239240, A239241, A239242, A000009.
%K A239243 nonn,easy
%O A239243 0,4
%A A239243 _Clark Kimberling_, Mar 13 2014