OFFSET
1,5
LINKS
StackExchange, Question 73354
MATHEMATICA
Accumulate@ Table[If[n == 1, 1, Apply[Times, FactorInteger[n] /. {p_, e_} /; p > 0 :> If[IntegerQ@ Sqrt@ e, (-1)^Sqrt@ e, 0]]], {n, 72}] (* Michael De Vlieger, Jan 27 2019 *)
PROG
(PARI) f(n) = {my(f=factor(n)[, 2]); prod(i=1, #f, if(issquare(f[i]), (-1)^sqrtint(f[i]), 0)); }; \\ A197774
a(n) = sum(k=1, n, f(k)); \\ Michel Marcus, Jan 27 2019
CROSSREFS
KEYWORD
sign
AUTHOR
A. Neves, Oct 18 2011
STATUS
approved