OFFSET
1
COMMENTS
Different from A197774.
Möbius transform of the characteristic function of A000583. - Amiram Eldar, May 03 2022
LINKS
FORMULA
G.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = Sum_{n>=1} x^(n^4). - Geoffrey Critzer, Mar 20 2015
Multiplicative with a(p^e) = (-1)^e if e == {0, 1} mod 4, and 0 if e == {2, 3} mod 4. [deduced from R. J. Mathar's Maple-program] - Antti Karttunen, May 03 2022
MAPLE
Z := proc(n, k)
local a, pf, e ;
a := 1 ;
for pf in ifactors(n)[2] do
e := pf[2] ;
if modp(e, k) = 0 then
;
elif modp(e, k) = 1 then
a := -a ;
else
a := 0 ;
end if;
end do;
a;
end proc:
A219009 := proc(n)
Z(n, 4) ;
end proc: # R. J. Mathar, May 28 2016
MATHEMATICA
nn = 100; f[x_] := Sum[a[n] x^n/(1 - x^n), {n, 1, nn}]; sol = SolveAlways[0 == Series[f[x] - Sum[x^(n^4), {n, 1, nn}], {x, 0, nn}], x]; Table[a[n], {n, 1, nn}] /. sol // Flatten (* Geoffrey Critzer, Mar 20 2015 *)
f[p_, e_] := If[Mod[e, 4] < 2, (-1)^e, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 03 2022, after Maple-program *)
PROG
(PARI) a(n)=sumdiv(n, d, if(issquare(d), issquare(sqrtint(d)), 0)*moebius(n/d))
(PARI) for(n=1, 100, print1(direuler(p=2, n, (1-X)/(1-X^4))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
(PARI) A219009(n) = { my(f=factor(n)); prod(k=1, #f~, if((f[k, 2]%4)>1, 0, ((-1)^f[k, 2]))); }; \\ Antti Karttunen, May 03 2022, after Maple-program.
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Benoit Cloitre, Nov 09 2012
STATUS
approved