login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066897 Total number of odd parts in all partitions of n. 28
1, 2, 5, 8, 15, 24, 39, 58, 90, 130, 190, 268, 379, 522, 722, 974, 1317, 1754, 2330, 3058, 4010, 5200, 6731, 8642, 11068, 14076, 17864, 22528, 28347, 35490, 44320, 55100, 68355, 84450, 104111, 127898, 156779, 191574, 233625, 284070, 344745, 417292, 504151 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also sum of all odd-indexed parts minus the sum of all even-indexed parts of all partitions of n (Cf. A206563). - Omar E. Pol, Feb 12 2012

Suppose that p=[p(1),p(2),p(3),...] is a partition of n with parts in nonincreasing order.  Let f(p) = p(1) - p(2) + p(3) - ... be the alternating sum of parts of p and let F(n) = sum of alternating sums of all partitions of n.  Conjecture: F(n) = A066897(n) for n >= 1. - Clark Kimberling, May 17 2019

LINKS

Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)

FORMULA

a(n) = Sum_{k=1..n} b(k)*numbpart(n-k), where b(k)=A001227(k)=number of odd divisors of k and numbpart() is A000041. - Vladeta Jovovic, Jan 26 2002

a(n) = Sum_{k=0..n} k*A103919(n,k). - Emeric Deutsch, Mar 13 2006

G.f.: Sum_{j>=1}(x^(2j-1)/(1-x^(2j-1)))/Product_{j>=1}(1-x^j). - Emeric Deutsch, Mar 13 2006

a(n) = A066898(n) + A209423(n) = A006128(n) - A066898(n). [Reinhard Zumkeller, Mar 09 2012]

a(n) = A207381(n) - A207382(n). - Omar E. Pol, Mar 11 2012

a(n) = (A006128(n) + A209423(n))/2. - Vaclav Kotesovec, May 25 2018

a(n) ~ exp(Pi*sqrt(2*n/3)) * (2*gamma + log(24*n/Pi^2)) / (8*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 25 2018

EXAMPLE

a(4) = 8 because in the partitions of 4, namely [4],[3,1],[2,2],[2,1,1],[1,1,1,1], we have a total of 0+2+0+2+4=8 odd parts.

MAPLE

g:=sum(x^(2*j-1)/(1-x^(2*j-1)), j=1..70)/product(1-x^j, j=1..70): gser:=series(g, x=0, 45): seq(coeff(gser, x^n), n=1..44);

# Emeric Deutsch, Mar 13 2006

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

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

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

         [f[1]+g[1], f[2]+g[2]+ (i mod 2)*g[1]]

      fi

    end:

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

seq(a(n), n=1..50);

# Alois P. Heinz, Mar 22 2012

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

(* Clark Kimberling, Mar 08 2012 *)

b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, n}, f = b[n, i-1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + Mod[i, 2]*g[[1]]}] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-Fran├žois Alcover, Sep 26 2015, after Alois P. Heinz *)

PROG

(Haskell)

a066897 = p 0 1 where

   p o _             0 = o

   p o k m | m < k     = 0

           | otherwise = p (o + mod k 2) k (m - k) + p o (k + 1) m

-- Reinhard Zumkeller, Mar 09 2012

(Haskell)

a066897 = length . filter odd . concat . ps 1 where

   ps _ 0 = [[]]

   ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]

-- Reinhard Zumkeller, Jul 13 2013

CROSSREFS

Cf. A000041, A001227, A006128, A066898, A103919.

Column 1 of A206563. - Omar E. Pol, Feb 15 2012

Sequence in context: A309630 A309658 A309662 * A078697 A066629 A154327

Adjacent sequences:  A066894 A066895 A066896 * A066898 A066899 A066900

KEYWORD

easy,nonn

AUTHOR

Naohiro Nomoto, Jan 24 2002

EXTENSIONS

More terms from Vladeta Jovovic, Jan 26 2002

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 30 16:16 EDT 2020. Contains 333127 sequences. (Running on oeis4.)