login
a(n) = Sum_{d|n} (-1)^(d-1)*d^3.
7

%I #33 Nov 04 2022 10:47:10

%S 1,-7,28,-71,126,-196,344,-583,757,-882,1332,-1988,2198,-2408,3528,

%T -4679,4914,-5299,6860,-8946,9632,-9324,12168,-16324,15751,-15386,

%U 20440,-24424,24390,-24696,29792,-37447,37296,-34398,43344,-53747,50654,-48020,61544,-73458

%N a(n) = Sum_{d|n} (-1)^(d-1)*d^3.

%C Also, expansion of (1 - phi(-q)^8) / 16 in powers of q where phi() is a Ramanujan theta function.

%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

%H G. C. Greubel, <a href="/A138503/b138503.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 Heekyoung Hahn, <a href="http://arxiv.org/abs/1507.04426">Convolution sums of some functions on divisors</a>, arXiv:1507.04426 [math.NT], 2015.

%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.

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

%F Expansion of (1 - (eta(q)^2 / eta(q^2))^8) / 16 in powers of q.

%F a(n) is multiplicative with a(2^e) = -(8^(e+1) - 15) / 7, a(p^e) = ((p^3)^(e+1) - 1) / (p^3 - 1).

%F G.f.: Sum_{k>0} k^3 * -(-x)^k / (1 - x^k).

%F a(n) = -(-1)^n * A008457(n). -16 * a(n) = A035016(n) unless n=0.

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

%e G.f. = q - 7*q^2 + 28*q^3 - 71*q^4 + 126*q^5 - 196*q^6 + 344*q^7 - 583*q^8 + ...

%p with(numtheory):

%p a := n -> add( (-1)^(d-1)*d^3, d in divisors(n) ): seq(a(n), n = 1..40);

%p # _Peter Bala_, Jan 11 2021

%t a[ n_] := If[ n < 0, 0, DivisorSum[ n, -(-1)^# #^3&]]; (* _Michael Somos_, Sep 25 2015 *)

%t a[ n_] := SeriesCoefficient[ (1 - EllipticTheta[ 4, 0, q]^8) / 16, {q, 0, n}]; (* _Michael Somos_, Sep 25 2015 *)

%t nmax = 40; Rest[CoefficientList[Series[-Product[((1-q^k)/(1+q^k))^8, {k, 1, nmax}]/16, {q, 0, nmax}], q]] (* _Vaclav Kotesovec_, Sep 26 2015 *)

%t f[p_, e_] := (p^(3*e + 3) - 1)/(p^3 - 1); f[2, e_] := 2 - (2^(3*e + 3) - 1)/7; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 40] (* _Amiram Eldar_, Nov 04 2022 *)

%o (PARI) {a(n) = if( n<0, 0, sumdiv(n, d, -(-1)^d * d^3))};

%Y Divisor sums Sum_{d|n} (-1)^(d-1)*d^k: A048272 (k = 0), A002129 (k = 1), A321543 (k = 2), A279395 (k = 4, unsigned), A321544 - A321551 (k = 5 to k = 12).

%Y Cf. A008457, A035016.

%K sign,mult

%O 1,2

%A _Michael Somos_, Mar 21 2008

%E Simpler definition from _N. J. A. Sloane_, Nov 23 2018