OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = 2 if e <= 3, and e-1 otherwise.
Dirichlet g.f.: zeta(s)^2 * f(s), where f(s) = Product_{p prime} (1 - 1/p^(2*s) + 1/p^(4*s)).
Sum_{k=1..n} a(k) ~ f(1) * n * (log(n) + 2*gamma - 1 + f'(1)/f(1)), where
f(1) = Product_{p prime} (1 - 2/p^2 + 1/p^4) = 0.66922021803510257394...,
f'(1)/f(1) = 2 * Sum_{p prime} (p^2-2) * log(p) / (p^4 - p^2 + 1) = 0.81150060034711480230..., and gamma is Euler's constant (A001620).
MATHEMATICA
f[p_, e_] := If[e <= 3, 2, e - 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = vecprod(apply(x -> if(x <= 3, 2, x-1), factor(n)[, 2]));
(Python)
from math import prod
from sympy import factorint
def A369310(n): return prod(2 if e<=2 else e-1 for e in factorint(n).values()) # Chai Wah Wu, Jan 19 2024
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Jan 19 2024
STATUS
approved