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.

A384422 The number of prime powers (not including 1) p^e that divide n such that e is coprime to the p-adic valuation of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 4, 2, 2, 2, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 2, 1, 3, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, May 28 2025

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := EulerPhi[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecsum(apply(eulerphi, factor(n)[, 2]));

Formula

Additive with a(p^e) = phi(e), where phi is the Euler totient function (A000010).
Sum_{k=1..n} a(k) ~ n*(log(log(n)) + B + C), where B is Mertens's constant (A077761), C = Sum_{p prime} f(1/p) = 0.24136815875213146317..., and f(x) = -x + (1-x)*x*Sum_{k>=1} mu(k)*x^(k-1)/(1-x^k)^2.