OFFSET
1,3
COMMENTS
Sum of odd divisors d of n such that n/d is square.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: Sum_{k>=1} (2*k - 1) * (theta_3(x^(2*k - 1)) - 1) / 2.
G.f.: Sum_{i>=1} Sum_{j>=1} phi(i) * x^(i*j^2) / (1 + x^(i*j^2)).
Dirichlet g.f.: (1 - 2^(1 - s)) * zeta(s-1) * zeta(2*s).
Sum_{k=1..n} a(k) ~ Pi^4 * n^2 / 360. - Vaclav Kotesovec, Oct 14 2019
Multiplicative with a(2^e) = 0 if e is odd, and 1 if e is even, and for p > 2, a(p^e) = (p^(e + 2) - p)/(p^2 - 1) if e is odd, and (p^(e + 2) - 1)/(p^2 - 1) if e is even. - Amiram Eldar, Oct 16 2020
MATHEMATICA
nmax = 81; CoefficientList[Series[Sum[x^(k^2) (1 + x^(2 k^2))/(1 - x^(2 k^2))^2, {k, 1, Floor[Sqrt[nmax]] + 1}], {x, 0, nmax}], x] // Rest
Table[DivisorSum[n, # &, OddQ[#] && IntegerQ[(n/#)^(1/2)] &], {n, 1, 81}]
f[p_, e_] := If[p == 2, Boole @ EvenQ[e], If[EvenQ[e], (p^(e + 2) - 1)/(p^2 - 1), (p^(e + 2) - p)/(p^2 - 1)]]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 16 2020 *)
PROG
(PARI) a(n) = sumdiv(n, d, if ((d%2) && issquare(n/d), d)); \\ Michel Marcus, Oct 14 2019
(Magma) a:=[]; for n in [1..81] do v:=[d:d in Divisors(n)| IsOdd(d) and IsSquare(n div d)]; if #v ne 0 then Append(~a, &+v); else Append(~a, 0); end if; end for; a; // Marius A. Burtea, Oct 14 2019
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Ilya Gutkovskiy, Oct 14 2019
STATUS
approved