login
A370899
Partial alternating sums of the unitary totient function (A047994).
1
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, 69, 51, 79, 71, 101, 70, 90, 74, 98, 74, 110, 92, 116, 88, 128, 116, 158, 128, 160, 138, 184, 154, 202, 178, 210, 174, 226, 200, 240, 198, 234, 206, 264, 240, 300, 270
OFFSET
1,3
LINKS
László Tóth, Alternating Sums Concerning Multiplicative Arithmetic Functions, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
FORMULA
a(n) = Sum_{k=1..n} (-1)^(k+1) * A047994(k).
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).
MATHEMATICA
uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); uphi[1] = 1; Accumulate[Array[(-1)^(# + 1) * uphi[#] &, 100]]
PROG
(PARI) uphi(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2] - 1); }
lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * uphi(k); print1(s, ", "))};
CROSSREFS
Similar sequences: A068762, A068773, A307704, A357817, A362028.
Sequence in context: A351159 A318762 A262598 * A191854 A129646 A277640
KEYWORD
sign,easy
AUTHOR
Amiram Eldar, Mar 05 2024
STATUS
approved