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.

A113184 Absolute difference between sum of odd divisors of n and sum of even divisors of n.

This page as a plain text file.
%I A113184 #56 Feb 16 2025 08:32:59
%S A113184 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,
%T A113184 40,40,30,24,32,61,48,18,48,65,38,20,56,78,42,32,44,60,78,24,48,116,
%U A113184 57,31,72,70,54,40,72,104,80,30,60,120,62,32,104,125,84,48,68,90,96,48,72
%N A113184 Absolute difference between sum of odd divisors of n and sum of even divisors of n.
%C A113184 The generating function equals 1/8 at q = Lambda = 0.1076539192... (A072558) the "One-Ninth" constant. - _Michael Somos_, Jul 21 2006
%C A113184 Absolute value of A002129. - _John W. Layman_, Sep 27 2012
%C A113184 The Möbius transform is 1, 0, 3, 4, 5, 0, 7, 8, 9, 0, 11, 12, 13, 0, 15, 16, 17, 0, 19, 20, 21, 0, 23, 24, 25, 0, 27, ... - _R. J. Mathar_, Jan 08 2013
%D A113184 G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.
%H A113184 G. C. Greubel, <a href="/A113184/b113184.txt">Table of n, a(n) for n = 1..1000</a>
%H A113184 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/One-NinthConstant.html">One-Ninth Constant</a>.
%F A113184 Multiplicative with a(2^e) = 2^(e+1)-3 if e>0, a(p^e) = (p^(e+1)-1)/(p-1) if p>2.
%F A113184 G.f.: Sum_{k>0} -(-x)^k/(1+(-x)^k)^2 = Sum_{k>0} k*x^k/(1-(-x)^k).
%F A113184 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
%F A113184 Bisection: a(2*k-1) = A000203(2*k-1), a(2*k) = A146076(2*k) - A000593(2*k), k >= 1. See the Hardy reference where a(n) = sigma^*_1(n). - _Wolfdieter Lang_, Jan 07 2017
%F A113184 From _Peter Bala_, Dec 11 2020: (Start)
%F A113184 a(n) = Sum_{d | n, d != 2 (mod 4)} d.
%F A113184 O.g.f.: Sum_{k >= 1, k != 2 (mod 4)} k*x^k/(1 - x^k). Cf. A284362.
%F A113184 Define a(n) = 0 for n < 1. Then a(n) = e(n) + a(n-1) + a(n-3) - a(n-6) - a(n-10) + + - -, where [1, 3, 6, 10, ...] is the sequence of triangular numbers A000217, and e(n) = (-1)^(n+1)*n if n is a triangular number; otherwise e(n) = 0. Examples of this recurrence are given below. (End)
%F A113184 Dirichlet g.f.: Sum_{n>0} a(n)/n^s = zeta(s) * zeta(s-1) * (1+2^(3-3*s)) / (1+2^(1-s)). - _Werner Schulte_, Jan 23 2021
%F A113184 Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / 16. - _Vaclav Kotesovec_, Aug 20 2021
%e A113184 From _Peter Bala_, Dec 11 2020: (Start)
%e A113184 n = 15: n is a triangular number, so e(n) = (-1)^(n+1)*n = 15 and a(15) = 15 + a(14) + a(12) - a(9) - a(5) =  15 + 8 + 20 - 13 - 6 = 24;
%e A113184 n = 16: n is a not triangular number, so e(n) = 0 and a(16) = a(15) + a(13) - a(10) - a(6) + a(1) =  24 + 14 - 6 - 4 + 1 = 29. (End)
%t A113184 f[n_]:=Module[{dn=Divisors[n],odn,edn},odn=Select[dn,OddQ];edn=Select[dn,EvenQ];Abs[Total[odn]-Total[edn]]]
%t A113184 f/@Range[80]  (* _Harvey P. Dale_, Feb 25 2011 *)
%t A113184 max = 80; s = (1/x)*Sum[k*x^k/(1 - (-x)^k), {k, 1, max}] + O[x]^max; CoefficientList[s, x] (* _Jean-François Alcover_, Dec 04 2015 *)
%t A113184 f[p_, e_] := If[p == 2, 2^(e + 1) - 3, (p^(e + 1) - 1)/(p - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jun 12 2022 *)
%o A113184 (PARI) a(n)=if(n<1, 0, (-1)^n*sumdiv(n,d,(-1)^d*d))
%o A113184 (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)))))}
%Y A113184 Cf. A002129(n) = -(-1)^n a(n).
%Y A113184 Cf. A072558, A284362.
%K A113184 nonn,mult
%O A113184 1,3
%A A113184 _Michael Somos_, Oct 17 2005
%E A113184 Name corrected by _Wolfdieter Lang_, Jan 07 2017