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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113184 Difference between sum of odd divisors of n and sum of even divisors of n. 4
1, 1, 4, 5, 6, 4, 8, 13, 13, 6, 12, 20, 14, 8, 24, 29, 18, 13, 20, 30, 32, 12, 24, 52, 31, 14, 40, 40, 30, 24, 32, 61, 48, 18, 48, 65, 38, 20, 56, 78, 42, 32, 44, 60, 78, 24, 48, 116, 57, 31, 72, 70, 54, 40, 72, 104, 80, 30, 60, 120, 62, 32, 104, 125, 84, 48, 68, 90, 96, 48, 72 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

COMMENTS

The generating function equals 1/8 at q = Lambda = 0.1076539192... (A072558) the "One-Ninth" constant. - Michael Somos Jul 21 2006

LINKS

Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.

FORMULA

Multiplicative with a(2^e) = 2^(e+1)-3 if e>0, a(p^e) = (p^(e+1)-1)/(p-1) if p>2.

G.f.: Sum_{k>0} -(-x)^k/(1+(-x)^k)^2 = Sum_{k>0} k*x^k/(1-(-x)^k).

Expansion of (1-(2/pi)^2(2E(k)-K(k))K(k))/8 in powers of nome q where E(k) and K(k) are complete elliptic integrals and q=exp(-pi*K(k')/K(k)). - Michael Somos Jul 21 2006

MATHEMATICA

f[n_]:=Module[{dn=Divisors[n], odn, edn}, odn=Select[dn, OddQ]; edn=Select[dn, EvenQ]; Abs[Total[odn]-Total[edn]]]

f/@Range[80]  (* From Harvey P. Dale, Feb 25 2011 *)

PROG

(PARI) a(n)=if(n<1, 0, (-1)^n*sumdiv(n, d, (-1)^d*d))

(PARI) {a(n)=local(A, p, e); if(n<1, 0, A=factor(n); prod(k=1, matsize(A)[1], if(p=A[k, 1], e=A[k, 2]; if(p==2, 2^(e+1)-3, (p^(e+1)-1)/(p-1)))))}

CROSSREFS

Cf. A002129(n)=-(-1)^n a(n).

Sequence in context: A196999 A090370 A002129 * A136004 A134299 A112780

Adjacent sequences:  A113181 A113182 A113183 * A113185 A113186 A113187

KEYWORD

nonn,mult

AUTHOR

Michael Somos, Oct 17 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 11:36 EST 2012. Contains 205623 sequences.