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.

A372504 Multiplicative with a(p^e) = e if e is a power of 2, and 0 otherwise.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, May 04 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecprod(apply(x -> if(x == 1 << valuation(x, 2), x, 0), factor(n)[, 2]));

Formula

Multiplicative with a(p^e) = A048298(e) = A209229(e) * e.
a(n) = A355823(n) * A005361(n).
a(A138302(n)) = A005361(A138302(n)) = A368473(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} f(1/p) = 1.31285540951965780409..., where f(x) = (1-x) * (1 + Sum_{k>=0} 2^k * x^(2^k)).