login
Sum of even divisors of n.
32

%I #77 Jan 11 2023 06:39:58

%S 0,2,0,6,0,8,0,14,0,12,0,24,0,16,0,30,0,26,0,36,0,24,0,56,0,28,0,48,0,

%T 48,0,62,0,36,0,78,0,40,0,84,0,64,0,72,0,48,0,120,0,62,0,84,0,80,0,

%U 112,0,60,0,144,0,64,0,126,0,96,0,108,0,96,0,182,0,76,0,120,0,112,0,180,0,84,0,192,0,88,0,168,0,156

%N Sum of even divisors of n.

%C The usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception. A074400 is the main entry.

%C a(n) is also the total number of parts in all partitions of n into an even number of equal parts. - _Omar E. Pol_, Jun 04 2017

%H Vincenzo Librandi, <a href="/A146076/b146076.txt">Table of n, a(n) for n = 1..10000</a>

%F a(2k-1) = 0, a(2k) = 2*sigma(k) for positive k.

%F Dirichlet g.f.: zeta(s - 1)*zeta(s)*2^(1 - s). - _Geoffrey Critzer_, Mar 29 2015

%F a(n) = A000203(n) - A000593(n). - _Omar E. Pol_, Apr 05 2016

%F L.g.f.: -log(Product_{ k>0 } (1-x^(2*k))) = Sum_{ n>=0 } (a(n)/n)*x^n. - _Benedict W. J. Irwin_, Jul 04 2016

%F a(n) = A000203(n)*(1 - (1/A038712(n))). - _Omar E. Pol_, Aug 01 2018

%F Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/24 = 0.411233... (A222171). - _Amiram Eldar_, Nov 06 2022

%p A146076 := proc(n)

%p if type(n,'even') then

%p 2*numtheory[sigma](n/2) ;

%p else

%p 0;

%p end if;

%p end proc: # _R. J. Mathar_, Dec 07 2017

%t f[n_] := Plus @@ Select[Divisors[n], EvenQ]; Array[f, 150] (* _Vincenzo Librandi_, May 17 2013 *)

%t a[n_] := DivisorSum[n, Boole[EvenQ[#]]*#&]; Array[a, 100] (* _Jean-François Alcover_, Dec 01 2015 *)

%t Table[CoefficientList[Series[-Log[QPochhammer[x^2, x^2]], {x, 0, 60}],x][[n + 1]] n, {n, 1, 60}] (* _Benedict W. J. Irwin_, Jul 04 2016 *)

%t a[n_] := If[OddQ[n], 0, 2*DivisorSigma[1, n/2]]; Array[a, 100] (* _Amiram Eldar_, Jan 11 2023 *)

%o (PARI) vector(80, n, if (n%2, 0, sumdiv(n, d, d*(1-(d%2))))) \\ _Michel Marcus_, Mar 30 2015

%o (PARI) a(n) = if (n%2, 0, 2*sigma(n/2)); \\ _Michel Marcus_, Apr 01 2015

%Y Cf. A000203, A000593, A006128, A038712, A074400, A183063, A222171.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Apr 09 2009

%E Corrected by _Jaroslav Krizek_, May 07 2011