OFFSET
1
COMMENTS
a(n) = 1 if and only if all the exponents in the prime factorization of n are equal.
a(n) depends only on the prime signature of n.
LINKS
Friedjof Tellkamp, Table of n, a(n) for n = 1..10000
FORMULA
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{n=1..m} a(n) = 6/Pi^2 (A059956).
Dirichlet g.f.: 1 + Sum_{k>=1} (zeta(k*s)/zeta(2*k*s)-1) for s > 1.
a(n) = 1 - chi(A059404)(n), where chi(f) denotes the characteristic function of f. - Peter Luschny, Jun 17 2025
MAPLE
a := n -> ifelse(1 < nops({seq(p[2], p in ifactors(n)[2])}), 0, 1):
seq(a(n), n = 1..86); # Peter Luschny, Jun 10 2025
MATHEMATICA
a[n_] := Boole[Equal@@FactorInteger[n][[All, 2]]]; Array[a, 86]
PROG
(PARI) a(n) = n == 1 || #Set(factor(n)[, 2]) == 1; \\ Amiram Eldar, Jun 10 2025
(Python)
from sympy import factorint
def A384667(n):
e = list(factorint(n).values())
return int(all(e[0] == a for a in e)) # Chai Wah Wu, Jun 10 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Friedjof Tellkamp, Jun 07 2025
STATUS
approved
