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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209423 Difference between the number of odd parts and the number of even parts in all the partitions of n. 5
1, 1, 4, 4, 10, 13, 24, 30, 52, 68, 105, 137, 202, 264, 376, 485, 669, 864, 1162, 1486, 1968, 2501, 3256, 4110, 5285, 6630, 8434, 10511, 13241, 16417, 20505, 25273, 31344, 38438, 47346, 57782, 70746, 85947, 104663, 126594, 153386, 184793, 222865, 267452 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

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

LINKS

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

FORMULA

a(n) = A066897(n) - A066898(n) = A206563(n,1) - A206563(n,2). - Omar E. Pol, Mar 08 2012

G.f.: G = Sum_{j>0} x^j/(1+x^j)/Product_{k>0}(1 - x^k). - Emeric Deutsch, Feb 08 2016

EXAMPLE

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.

MAPLE

b:= proc(n, i) option remember; local m, f, g;

      m:= irem(i, 2);

      if n=0 then [1, 0, 0]

    elif i<1 then [0, 0, 0]

    else f:= b(n, i-1); g:= `if`(i>n, [0$3], b(n-i, i));

         [f[1]+g[1], f[2]+g[2]+m*g[1], f[3]+g[3]+(1-m)*g[1]]

      fi

    end:

a:= n-> b(n, n)[2] -b(n, n)[3]:

seq(a(n), n=1..50);  # Alois P. Heinz, Jul 09 2012

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

MATHEMATICA

f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]

o[n_] := Sum[f[n, i], {i, 1, n, 2}]

e[n_] := Sum[f[n, i], {i, 2, n, 2}]

Table[o[n], {n, 1, 45}]  (* A066897 *)

Table[e[n], {n, 1, 45}]  (* A066898 *)

%% - %                   (* 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 *)

CROSSREFS

Cf. A066897, A066898, A000041.

Sequence in context: A058596 A180964 A237668 * A185784 A185904 A201618

Adjacent sequences:  A209420 A209421 A209422 * A209424 A209425 A209426

KEYWORD

nonn

AUTHOR

Clark Kimberling, Mar 08 2012

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 April 25 00:46 EDT 2017. Contains 285346 sequences.