login
The number of divisors of the largest square dividing n.
3

%I #16 Sep 02 2023 08:18:38

%S 1,1,1,3,1,1,1,3,3,1,1,3,1,1,1,5,1,3,1,3,1,1,1,3,3,1,3,3,1,1,1,5,1,1,

%T 1,9,1,1,1,3,1,1,1,3,3,1,1,5,3,3,1,3,1,3,1,3,1,1,1,3,1,1,3,7,1,1,1,3,

%U 1,1,1,9,1,1,3,3,1,1,1,5,5,1,1,3,1,1,1

%N The number of divisors of the largest square dividing n.

%C All the terms are odd.

%C The sum of these divisors is A365332(n).

%C The number of divisors of the square root of the largest square dividing n is A046951(n).

%H Amiram Eldar, <a href="/A365331/b365331.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000005(A008833(n)).

%F a(n) = 1 if and only if n is squarefree (A005117).

%F Multiplicative with a(p^e) = e + 1 - (e mod 2).

%F Dirichlet g.f.: zeta(s)*zeta(2*s)^2/zeta(4*s).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/2.

%F More precise asymptotics: Sum_{k=1..n} a(k) ~ 5*n/2 + 3*zeta(1/2)*sqrt(n)/Pi^2 * (log(n) + 4*gamma - 2 - 24*zeta'(2)/Pi^2 + zeta'(1/2)/zeta(1/2)), where gamma is the Euler-Mascheroni constant A001620. - _Vaclav Kotesovec_, Sep 02 2023

%p a:= n-> mul(2*iquo(i[2], 2)+1, i=ifactors(n)[2]):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 01 2023

%t f[p_, e_] := e + 1 - Mod[e, 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]

%o (PARI) a(n) = vecprod(apply(x -> x + 1 - x%2, factor(n)[, 2]));

%o (PARI) a(n) = numdiv(n/core(n)); \\ _Michel Marcus_, Sep 02 2023

%Y Cf. A000005, A005117, A008833, A046951, A365332.

%K nonn,easy,mult

%O 1,4

%A _Amiram Eldar_, Sep 01 2023