OFFSET
1,2
COMMENTS
The number of unitary divisors of the smallest square divisible by n is the same as the number of unitary divisors of n, A034444(n).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = p^(e + (e mod 2)) + 1.
Dirichlet g.f.: zeta(s) * zeta(2*s-2) * Product_{p prime} (1 + 1/p^(s-2) - 1/p^(2*s-2) - 1/p^(3*s-2)).
Sum_{k=1..n} a(k) ~ c * n^3, where c = (Pi^2/45) * zeta(3) * Product_{p prime} (1 - 1/p^4 + 1/p^5 - 1/p^6) = 0.248414056414... .
MATHEMATICA
f[p_, e_] := 1 + p^(e + Mod[e, 2]); a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i=1, #f~, f[i, 1]^(f[i, 2] + f[i, 2]%2) + 1); }
(Python)
from math import prod
from sympy import factorint
def A365479(n): return prod(p**(e+(e&1))+1 for p, e in factorint(n).items()) # Chai Wah Wu, Sep 05 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Sep 05 2023
STATUS
approved