login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A197775
Partial sums of A197774.
0
1, 0, -1, -1, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -1, 0, -1, -1, -2, -2, -1, 0, -1, -1, -1, 0, 0, 0, -1, -2, -3, -3, -2, -1, 0, 0, -1, 0, 1, 1, 0, -1, -2, -2, -2, -1, -2, -3, -3, -3, -2, -2, -3, -3, -2, -2, -1, 0, -1, -1, -2, -1, -1, -1, 0, -1, -2, -2, -1, -2, -3, -3
OFFSET
1,5
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
Cf. A197774.
Sequence in context: A343240 A145866 A103318 * A002321 A043530 A297771
KEYWORD
sign
AUTHOR
A. Neves, Oct 18 2011
STATUS
approved