OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
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 and p. 8).
FORMULA
G.f.: Sum_{k>=1} k^9*x^k/(1 + x^(2*k)). - Ilya Gutkovskiy, Nov 26 2018
From Robert Israel, Nov 26 2018: (Start) a(2^m) = 2^(9*m).
For prime p == 1 (mod 4), a(p^m) = (p^(9(m+1))-1)/(p^9-1).
For prime p == 3 (mod 4), a(p^m) = (p^(9(m+1))+(-1)^m)/(p^9+1). (End)
From Amiram Eldar, Nov 04 2023: (Start)
Sum_{k=1..n} a(k) ~ c * n^10 / 10, where c = beta(10) = 0.99998316402... and beta is the Dirichlet beta function. (End)
a(n) = Sum_{d|n} (n/d)^9*sin(d*Pi/2). - Ridouane Oudra, Sep 27 2024
MAPLE
f:= n ->
mul(piecewise(t[1]=2, 2^(9*t[2]), t[1] mod 4 = 1, (t[1]^(9*(t[2]+1))-1)/(t[1]^9-1), (t[1]^(9*(t[2]+1))+(-1)^t[2])/(t[1]^9+1)), t = ifactors(n)[2]):
map(f, [$1..100]); # Robert Israel, Nov 26 2018
MATHEMATICA
s[n_, r_] := DivisorSum[n, #^9 &, Mod[n/#, 4]==r &]; a[n_] := s[n, 1] - s[n, 3]; Array[a, 30] (* Amiram Eldar, Nov 26 2018 *)
s[n_] := If[OddQ[n], (-1)^((n-1)/2), 0]; (* A101455 *)
f[p_, e_] := (p^(9*e+9) - s[p]^(e+1))/(p^9 - s[p]); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 04 2023 *)
PROG
(PARI) apply( a(n)=sumdiv(n, d, if(bittest(n\d, 0), (2-n\d%4)*d^9)), [1..30]) \\ M. F. Hasler, Nov 26 2018
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
N. J. A. Sloane, Nov 24 2018
STATUS
approved