login
a(n) = Sum_{ d >= 1, d divides n} (-1)^(n-d)*d^4.
7

%I #17 Sep 08 2022 08:46:18

%S 1,15,82,271,626,1230,2402,4367,6643,9390,14642,22222,28562,36030,

%T 51332,69903,83522,99645,130322,169646,196964,219630,279842,358094,

%U 391251,428430,538084,650942,707282,769980,923522,1118479,1200644,1252830,1503652,1800253,1874162,1954830,2342084,2733742

%N a(n) = Sum_{ d >= 1, d divides n} (-1)^(n-d)*d^4.

%C This is the k=4 member of the family sigma^*_k(n), defined in the Hardy reference, which is sigma_k(2*j+1) if n = 2*j+1 and sigma_k^e(2*j) - sigma_k^o(2*j) if n=2*j, where the superscript e and o stands for a restriction to even and odd divisors in the sum of their k-th powers, respectively.

%D G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.

%H Amiram Eldar, <a href="/A279395/b279395.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 <a href="/index/Ge#Glaisher">Index entries for sequences mentioned by Glaisher</a>

%F a(n) = Sum_{ d >= 1, d divides n} (-1)^(n-d)*d^4.

%F Bisection: a(2*j-1) = A001159(2*j-1), a(2*j) = 16*A001159(j) - A051001(j), j >= 1. See the comment above for k=4, and the Hardy reference.

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

%F Multiplicative with a(2^k) = 2^4*(2^(4*k)-1)/(2^4-1) - 1 = (2^(4*(k+1)) - 31)/15 and a(p^k) = (p^(4*(k+1))-1)/(p^4-1) for primes p > 2 (see A001159).

%p # A version with signs - _N. J. A. Sloane_, Nov 23 2018

%p zet1:=(n,i)->add((-1)^(d-1)*d^i, d in divisors(n));

%p szet1:=i->[seq(zet1(n,i),n=1..120)];

%p szet1(4);

%t f[p_, e_] := If[p == 2, (2^(4*(e + 1)) - 31)/15, (p^(4*(e + 1)) - 1)/(p^4 - 1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 40] (* _Amiram Eldar_, Aug 17 2019 *)

%o (PARI) a(n) = sumdiv(n, d, (-1)^(n-d)*d^4); \\ _Michel Marcus_, Jan 09 2017

%o (Magma) [&+[(-1)^(n-d)*d^4:d in Divisors(n)]:n in [1..40]]; // _Marius A. Burtea_, Aug 17 2019

%Y Cf. A112329 (k=0), A113184 (k=1), A064027 (k=2), A008457(k=3).

%K nonn,mult,easy

%O 1,2

%A _Wolfdieter Lang_, Jan 09 2017