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.

A239239 Number of strict partitions of n having fewer odd parts than even.

This page as a plain text file.
%I A239239 #15 Aug 29 2016 07:30:37
%S A239239 0,0,1,0,1,0,2,1,2,2,3,4,4,7,5,11,7,16,10,23,15,32,21,43,32,57,45,74,
%T A239239 66,96,92,123,129,157,175,199,239,253,316,320,419,406,544,514,704,652,
%U A239239 898,825,1142,1045,1435,1321,1798,1669,2234,2103,2766,2646,3404
%N A239239 Number of strict partitions of n having fewer odd parts than even.
%C A239239 a(n) = Sum_{k<=-1} A240021(n,k). - _Alois P. Heinz_, Apr 02 2014
%H A239239 Alois P. Heinz, <a href="/A239239/b239239.txt">Table of n, a(n) for n = 0..1000</a>
%F A239239 a(n) + A239243(n) = A000009(n) for n >=1.
%e A239239 a(6) counts these partitions:  6, 42.
%p A239239 b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
%p A239239      `if`(n=0, `if`(t<0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
%p A239239       b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
%p A239239     end:
%p A239239 a:= n-> b(n$2, 0):
%p A239239 seq(a(n), n=0..60);  # _Alois P. Heinz_, Mar 15 2014
%t A239239 z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
%t A239239 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] < Count[#, _?EvenQ] &]], {n, 0, z}] (* A239239 *)
%t A239239 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] <= Count[#, _?EvenQ] &]], {n, 0, z}] (* A239240 *)
%t A239239 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] == Count[#, _?EvenQ] &]], {n, 0, z}] (* A239241 *)
%t A239239 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] > Count[#, _?EvenQ] &]], {n, 0, z}] (* A239242 *)
%t A239239 Table[g[Select[Select[p[n], d[#] == # &], Count[#, _?OddQ] >= Count[#, _?EvenQ] &]], {n, 0, z}] (* A239243 *)
%t A239239 (* _Peter J. C. Moses_, Mar 10 2014 *)
%t A239239 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 29 2016, after _Alois P. Heinz_ *)
%Y A239239 Cf. A239240, A239241, A239242, A239243, A000009.
%K A239239 nonn,easy
%O A239239 0,7
%A A239239 _Clark Kimberling_, Mar 13 2014