cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A370899 Partial alternating sums of the unitary totient function (A047994).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 05 2024

Keywords

Crossrefs

Similar sequences: A068762, A068773, A307704, A357817, A362028.

Programs

  • Mathematica
    uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); uphi[1] = 1; Accumulate[Array[(-1)^(# + 1) * uphi[#] &, 100]]
  • 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, ", "))};

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).