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.

A209423 Difference between the number of odd parts and the number of even parts in all the partitions of n.

This page as a plain text file.
%I A209423 #44 Aug 05 2020 21:56:50
%S A209423 1,1,4,4,10,13,24,30,52,68,105,137,202,264,376,485,669,864,1162,1486,
%T A209423 1968,2501,3256,4110,5285,6630,8434,10511,13241,16417,20505,25273,
%U A209423 31344,38438,47346,57782,70746,85947,104663,126594,153386,184793,222865,267452
%N A209423 Difference between the number of odd parts and the number of even parts in all the partitions of n.
%C A209423 a(n) = number of parts of odd multiplicity (each counted only once) in all partitions of n. Example: a(5) = 10 because we have [5'],[4',1'],[3',2'], [3',1,1],[2,2,1'],[2',1',1,1], and [1',1,1,1,1] (the 10 counted parts are marked). - _Emeric Deutsch_, Feb 08 2016
%H A209423 Vaclav Kotesovec, <a href="/A209423/b209423.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Alois P. Heinz)
%F A209423 a(n) = A066897(n) - A066898(n) = A206563(n,1) - A206563(n,2). - _Omar E. Pol_, Mar 08 2012
%F A209423 G.f.: Sum_{j>0} x^j/(1+x^j)/Product_{k>0}(1 - x^k). - _Emeric Deutsch_, Feb 08 2016
%F A209423 a(n) = Sum_{i=1..n} (-1)^(i + 1)*A181187(n, i). - _John M. Campbell_, Mar 18 2018
%F A209423 a(n) ~ log(2) * exp(Pi*sqrt(2*n/3)) / (2^(3/2) * Pi * sqrt(n)). - _Vaclav Kotesovec_, May 25 2018
%F A209423 For n > 0, a(n) = A305121(n) + A305123(n). - _Vaclav Kotesovec_, May 26 2018
%F A209423 a(n) = Sum_{k=-floor(n/2)+(n mod 2)..n} k * A240009(n,k). - _Alois P. Heinz_, Oct 23 2018
%F A209423 a(n) = Sum_{k>0} k * A264398(n,k). - _Alois P. Heinz_, Aug 05 2020
%e A209423 The partitions of 5 are [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1], a total of 15 odd parts and 5 even parts, so that a(5)=10.
%p A209423 b:= proc(n, i) option remember; local m, f, g;
%p A209423       m:= irem(i, 2);
%p A209423       if n=0 then [1, 0, 0]
%p A209423     elif i<1 then [0, 0, 0]
%p A209423     else f:= b(n, i-1); g:= `if`(i>n, [0$3], b(n-i, i));
%p A209423          [f[1]+g[1], f[2]+g[2]+m*g[1], f[3]+g[3]+(1-m)*g[1]]
%p A209423       fi
%p A209423     end:
%p A209423 a:= n-> b(n, n)[2] -b(n, n)[3]:
%p A209423 seq(a(n), n=1..50);  # _Alois P. Heinz_, Jul 09 2012
%p A209423 g := add(x^j/(1+x^j), j = 1 .. 80)/mul(1-x^j, j = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # _Emeric Deutsch_, Feb 08 2016
%t A209423 f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]
%t A209423 o[n_] := Sum[f[n, i], {i, 1, n, 2}]
%t A209423 e[n_] := Sum[f[n, i], {i, 2, n, 2}]
%t A209423 Table[o[n], {n, 1, 45}]  (* A066897 *)
%t A209423 Table[e[n], {n, 1, 45}]  (* A066898 *)
%t A209423 %% - %                   (* A209423 *)
%t A209423 b[n_, i_] := b[n, i] = Module[{m, f, g}, m = Mod[i, 2]; If[n==0, {1, 0, 0}, If[i<1, {0, 0, 0}, f = b[n, i-1]; g = If[i>n, {0, 0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + m*g[[1]], f[[3]] + g[[3]] + (1-m)* g[[1]]}]]]; a[n_] := b[n, n][[2]] - b[n, n][[3]]; Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, Nov 16 2015, after _Alois P. Heinz_ *)
%Y A209423 Cf. A066897, A066898, A000041, A240009, A264398.
%K A209423 nonn
%O A209423 1,3
%A A209423 _Clark Kimberling_, Mar 08 2012