OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = 2 if e = 2, and 1 otherwise.
a(n) >= 1, with equality if and only if n is in A337050.
Dirichlet g.f.: zeta(s) * Product_{p prime} (1 + 1/p^(2*s) - 1/p^(3*s)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} (1 + 1/p^2 - 1/p^3) = 1.30596827416754083231... .
MATHEMATICA
f[p_, e_] := If[e == 2, 2, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = vecprod(apply(x->if(x==2, 2, 1), factor(n)[, 2]));
(Python)
from sympy import factorint
def A368885(n): return 1<<sum(1 for e in factorint(n).values() if e==2) # Chai Wah Wu, Jan 09 2024
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Jan 09 2024
STATUS
approved