%I #16 Jan 09 2024 23:58:12
%S 1,1,1,4,1,1,1,1,9,1,1,4,1,1,1,1,1,9,1,4,1,1,1,1,25,1,1,4,1,1,1,1,1,1,
%T 1,36,1,1,1,1,1,1,1,4,9,1,1,1,49,25,1,4,1,1,1,1,1,1,1,4,1,1,9,1,1,1,1,
%U 4,1,1,1,9,1,1,25,4,1,1,1,1,1,1,1,4,1,1
%N The largest unitary divisor of n that is the square of a squarefree number (A062503).
%C The number of these divisors is A368885(n).
%H Amiram Eldar, <a href="/A368884/b368884.txt">Table of n, a(n) for n = 1..10000</a>
%H Vaclav Kotesovec, <a href="/A368884/a368884.jpg">Graph - the asymptotic ratio (100000 terms)</a>
%F Multiplicative with a(p^e) = p^2 if e = 2, and 1 otherwise.
%F a(n) = n / A368886(n).
%F a(n) >= 1, with equality if and only if n is in A337050.
%F a(n) <= n, with equality if and only if n is in A062503.
%F Dirichlet g.f.: zeta(s) * Product_{p prime} (1 + 1/p^(2*s-2) - 1/p^(2*s) - 1/p^(3*s-2) + 1/p^(3*s)).
%F From _Vaclav Kotesovec_, Jan 09 2024: (Start)
%F Dirichlet g.f.: zeta(s) * zeta(2*s-2) * Product_{p prime} (p^(2*s) - p^2) * (1 + (p^s - 1) * (p^2 + p^s + p^(2*s))) / p^(5*s).
%F Sum_{k=1..n} a(k) ~ c * zeta(3/2) * n^(3/2)/3, where c = Product_{p prime} (1 - 1/p^(11/2) + 1/p^(9/2) + 1/p^4 + 1/p^(7/2) - 1/p^3 - 1/p^(5/2) - 1/p^2) = 0.45021226373776124069206513259105992151602618717147857709105849... (End)
%t f[p_, e_] := If[e == 2, p^2, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
%o (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,2] == 2, f[i,1]^f[i,2], 1));}
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A368884(n): return prod(p**e for p, e in factorint(n).items() if e==2) # _Chai Wah Wu_, Jan 09 2024
%Y Cf. A005117, A062503, A337050, A368885, A368886.
%K nonn,easy,mult
%O 1,4
%A _Amiram Eldar_, Jan 09 2024
|