%I #7 Mar 05 2024 11:51:46
%S 1,0,2,-1,3,1,7,0,8,4,14,8,20,14,22,7,23,15,33,21,33,23,45,31,55,43,
%T 69,51,79,71,101,70,90,74,98,74,110,92,116,88,128,116,158,128,160,138,
%U 184,154,202,178,210,174,226,200,240,198,234,206,264,240,300,270
%N Partial alternating sums of the unitary totient function (A047994).
%H Amiram Eldar, <a href="/A370899/b370899.txt">Table of n, a(n) for n = 1..10000</a>
%H László Tóth, <a href="https://www.emis.de/journals/JIS/VOL20/Toth/toth25.html">Alternating Sums Concerning Multiplicative Arithmetic Functions</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
%F a(n) = Sum_{k=1..n} (-1)^(k+1) * A047994(k).
%F a(n) = c * n^2 + O(n * log(n)^(5/3) * log(log(n))^(4/3)), where c = A065463 / 10 = 0.07044422... (Tóth, 2017).
%t uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); uphi[1] = 1; Accumulate[Array[(-1)^(# + 1) * uphi[#] &, 100]]
%o (PARI) uphi(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2] - 1);}
%o lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * uphi(k); print1(s, ", "))};
%Y Cf. A047994, A065463, A177754.
%Y Similar sequences: A068762, A068773, A307704, A357817, A362028.
%K sign,easy
%O 1,3
%A _Amiram Eldar_, Mar 05 2024