%I #14 Jan 19 2024 20:34:07
%S 1,2,2,2,2,4,2,2,2,4,2,4,2,4,4,3,2,4,2,4,4,4,2,4,2,4,2,4,2,8,2,4,4,4,
%T 4,4,2,4,4,4,2,8,2,4,4,4,2,6,2,4,4,4,2,4,4,4,4,4,2,8,2,4,4,5,4,8,2,4,
%U 4,8,2,4,2,4,4,4,4,8,2,6,3,4,2,8,4,4,4
%N The number of divisors d of n such that gcd(d, n/d) is a powerful number.
%C First differs from A365488 at n = 32, and from A365171 at n = 64.
%H Amiram Eldar, <a href="/A369310/b369310.txt">Table of n, a(n) for n = 1..10000</a>
%F Multiplicative with a(p^e) = 2 if e <= 3, and e-1 otherwise.
%F a(n) >= A034444(n), with equality if and only if n is biquadratefree (A046100).
%F a(n) <= A000005(n), with equality if and only if n is squarefree (A005117).
%F Dirichlet g.f.: zeta(s)^2 * f(s), where f(s) = Product_{p prime} (1 - 1/p^(2*s) + 1/p^(4*s)).
%F Sum_{k=1..n} a(k) ~ f(1) * n * (log(n) + 2*gamma - 1 + f'(1)/f(1)), where
%F f(1) = Product_{p prime} (1 - 2/p^2 + 1/p^4) = 0.66922021803510257394...,
%F 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).
%t f[p_, e_] := If[e <= 3, 2, e - 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
%o (PARI) a(n) = vecprod(apply(x -> if(x <= 3, 2, x-1), factor(n)[, 2]));
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A369310(n): return prod(2 if e<=2 else e-1 for e in factorint(n).values()) # _Chai Wah Wu_, Jan 19 2024
%Y Cf. A000005, A001620, A001694, A005117, A034444, A046100, A365171, A365488, A369309.
%K nonn,easy,mult
%O 1,2
%A _Amiram Eldar_, Jan 19 2024