|
|
A344299
|
|
Expansion of Sum_{k>=1} (-1)^(k+1) * x^(k^2) / (1 - x^(k^2)).
|
|
4
|
|
|
1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, -1, 1, 2, 1, 0, 1, 1, 1, 0, 2, 1, 2, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, -1, 2, 2, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 2, -2, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, -1, 3, 1, 1, 0, 1, 1, 1, 0, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,9
|
|
COMMENTS
|
Number of odd squares dividing n minus number of even squares dividing n.
Inverse Moebius transform of A258998.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{k>=1} (1 - theta_4(x^k)) / 2.
Multiplicative with a(2^e) = 1 - floor(e/2), and a(p^e) = 1 + floor(e/2) for p > 2.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi^2/12 (A072691). (End)
|
|
MATHEMATICA
|
nmax = 90; CoefficientList[Series[Sum[(-1)^(k + 1) x^(k^2)/(1 - x^(k^2)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
Table[DivisorSum[n, (-1)^(# + 1) &, IntegerQ[#^(1/2)] &], {n, 1, 90}]
f[p_, e_] := 1 - (-1)^p*Floor[e/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 15 2022 *)
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 - (-1)^f[i, 1] * floor(f[i, 2]/2)); } \\ Amiram Eldar, Nov 15 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|