login
Sum of squares of odd divisors of n.
33

%I #72 Aug 12 2024 01:25:49

%S 1,1,10,1,26,10,50,1,91,26,122,10,170,50,260,1,290,91,362,26,500,122,

%T 530,10,651,170,820,50,842,260,962,1,1220,290,1300,91,1370,362,1700,

%U 26,1682,500,1850,122,2366,530,2210,10,2451,651,2900,170,2810,820,3172,50,3620,842,3482

%N Sum of squares of odd divisors of n.

%C Denoted by Delta_2(n) in Glaisher 1907. - _Michael Somos_, May 17 2013

%C The sum of squares of even divisors of 2*k = 4*A001157(k), and the sum of squares of even divisors of 2*k-1 vanishes, for k >= 1. - _Wolfdieter Lang_, Jan 07 2017

%D J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4).

%H Reinhard Zumkeller, <a href="/A050999/b050999.txt">Table of n, a(n) for n = 1..10000</a>

%H J. W. L. Glaisher, <a href="https://books.google.com/books?id=bLs9AQAAMAAJ&amp;pg=RA1-PA1">On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares</a>, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).

%H R. J. Mathar, <a href="http://arxiv.org/abs/1106.4038">Survey of Dirichlet Series of Multiplicative Arithmetic Functions</a>, arXiv:1106.4038 [math.NT], 2011, eq. (3.74).

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/OddDivisorFunction.html">Odd Divisor Function</a>.

%H <a href="/index/Ge#Glaisher">Index entries for sequences mentioned by Glaisher</a>

%F From _Vladeta Jovovic_, Sep 10 2001: (Start)

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

%F a(n) = (1/2)*Sum_{d|n} (1-(-1)^d)*d^2.

%F a(2n) = sigma_2(2n) - 4*sigma_2(n), a(2n+1) = sigma_2(2n+1), where sigma_2(n) is sum of squares of divisors of n (A001157).

%F More generally, if b(n, k) is the sum of k-th powers of odd divisors of n then b(2n, k) = sigma_k(2n)-2^k*sigma_k(n), b(2n+1, k) = sigma_k(2n+1). b(n, k) is multiplicative with a(p^e) = 1 if p = 2, (p^(k*e+k)-1)/(p^k-1) if p > 2. (End)

%F G.f. for b(n, k): Sum_{m>0} m^k*x^m*(1-(2^k-1)*x^m)/(1-x^(2*m)). - _Vladeta Jovovic_, Oct 19 2002

%F Dirichlet g.f. (1-2^(2-s))*zeta(s)*zeta(s-2). - _R. J. Mathar_, Apr 06 2011

%F Dirichlet convolution of A001157 with [1,-4,0,0,0,0...]. Dirichlet convolution of [1,-3,1,-3,1,-3,..] with A000290. Dirichlet convolution of [1,0,9,0,25,0,49,0,81,...] with A000012 (or A057427). - _R. J. Mathar_, Jun 28 2011

%F a(n) = sum(A182469(n,k)^2: k=1..A001227(n)). [_Reinhard Zumkeller_, May 01 2012]

%F Sum_{k=1..n} a(k) ~ zeta(3) * n^3 / 6. - _Vaclav Kotesovec_, Nov 09 2018

%F G.f.: Sum_{n >= 1} x^n*(1 + 6*x^(2*n) + x^(4*n))/(1 - x^(2*n))^3. - _Peter Bala_, Dec 19 2021

%F Sum_{k=1..n} (-1)^(k+1) * a(k) ~ zeta(3) * n^3 / 8. - _Vaclav Kotesovec_, Aug 07 2022

%e x + x^2 + 10*x^3 + x^4 + 26*x^5 + 10*x^6 + 50*x^7 + x^8 + 91*x^9 + 26*x^10 + ...

%t a[n_] := 1/2*Sum[(1 - (-1)^d)*d^2, {d, Divisors[n]}]; Table[a[n], {n, 1, 59}] (* _Jean-François Alcover_, Oct 23 2012, from 2nd formula *)

%t a[ n_] := If[ n < 1, 0, Sum[ Mod[ d, 2] d^2, {d, Divisors@n}]] (* _Michael Somos_, May 17 2013 *)

%t f[p_, e_] := If[p == 2, 1, (p^(2*e + 2) - 1)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, Nov 22 2020 *)

%t Table[Total[Select[Divisors[n],OddQ]^2],{n,80}] (* _Harvey P. Dale_, Jul 19 2024 *)

%o (Haskell)

%o a050999 = sum . map (^ 2) . a182469_row

%o -- _Reinhard Zumkeller_, May 01 2012

%o (PARI) a(n)=sumdiv(n,d, if(d%2==1, d^2, 0 ) ); /* _Joerg Arndt_, Oct 07 2012 */

%o (Python)

%o from sympy import divisor_sigma

%o def A050999(n): return int(divisor_sigma(n>>(~n&n-1).bit_length(),2)) # _Chai Wah Wu_, Jul 16 2022

%Y Cf. A051000 - A051002, A000593, A001227, A000203, A001157-A001160, A013954-A013972.

%Y Glaisher's Delta_i (i=0..12): A001227, A000593, A050999, A051000, A051001, A051002, A321810, A321811, A321812, A321813, A321814, A321815, A321816

%K nonn,mult

%O 1,3

%A _Eric W. Weisstein_