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”).
%I #18 Jan 27 2019 08:38:02
%S 1,0,-1,-1,-2,-1,-2,-2,-2,-1,-2,-2,-3,-2,-1,0,-1,-1,-2,-2,-1,0,-1,-1,
%T -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,
%U -2,-2,-3,-3,-2,-2,-1,0,-1,-1,-2,-1,-1,-1,0,-1,-2,-2,-1,-2,-3,-3
%N Partial sums of A197774.
%H StackExchange, <a href="http://math.stackexchange.com/questions/73354/two-dirichlets-series-related-to-the-divisor-summatory-function-and-to-the-riem">Question 73354</a>
%t 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 *)
%o (PARI) f(n) = {my(f=factor(n)[, 2]); prod(i=1, #f, if(issquare(f[i]), (-1)^sqrtint(f[i]), 0)); }; \\ A197774
%o a(n) = sum(k=1, n, f(k)); \\ _Michel Marcus_, Jan 27 2019
%Y Cf. A197774.
%K sign
%O 1,5
%A _A. Neves_, Oct 18 2011