A328372 Expansion of Sum_{k>=1} x^(k^2) / (1 - x^(2*k^2)).
1, 0, 1, 1, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 2, 0, 2, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 1, 3, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[#[d:d in Divisors(n)| IsOdd(d) and IsSquare(n div d)]:n in [1..90]]; // Marius A. Burtea, Oct 14 2019
-
Mathematica
nmax = 91; CoefficientList[Series[Sum[x^(k^2)/(1 - x^(2 k^2)), {k, 1, Floor[Sqrt[nmax]] + 1}], {x, 0, nmax}], x] // Rest Table[DivisorSum[n, 1 &, OddQ[#] && IntegerQ[(n/#)^(1/2)] &], {n, 1, 91}] Table[DivisorSum[n, (-1)^PrimeOmega[#] Mod[DivisorSigma[1, #], 2] &], {n, 1, 91}] f[p_, e_] := If[p == 2, Boole @ EvenQ[e], Ceiling[(e + 1)/2]]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 16 2020 *)
-
PARI
a(n) = sumdiv(n, d, (d%2) && issquare(n/d)); \\ Michel Marcus, Oct 14 2019
Formula
G.f.: Sum_{k>=1} (theta_3(x^(2*k - 1)) - 1) / 2.
Dirichlet g.f.: (1 - 1/2^s) * zeta(s) * zeta(2*s).
Sum_{k=1..n} a(k) ~ Pi^2 * n / 12 + (sqrt(2)-1) * zeta(1/2) * sqrt(n/2). - 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) = ceiling((e+1)/2). - Amiram Eldar, Oct 16 2020
Comments