login
The number of divisors d of n such that gcd(d, n/d) is a square.
6

%I #13 Jan 20 2024 04:41:11

%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,4,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 square.

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

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

%H Vaclav Kotesovec, <a href="/A365171/a365171.jpg">Graph - the asymptotic ratio (100000 terms)</a>

%F Multiplicative with a(p^e) = floor((e + 3)/4) + floor((e + 4)/4) = A004524(e+3).

%F a(n) <= A000005(n), with equality if and only if n is squarefree (A005117).

%F a(n) >= A034444(n), with equality if and only if n is not a biquadrateful number (A046101).

%F a(n) == 1 (mod 2) if and only if n is a fourth power (A000583).

%F From _Vaclav Kotesovec_, Jan 20 2024: (Start)

%F Dirichlet g.f.: zeta(s)^2 * Product_{p prime} (1 - 1/(p^(2*s) + 1)).

%F Let f(s) = Product_{p prime} (1 - 1/(p^(2*s) + 1)).

%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 - 1/(p^2 + 1)) = Pi^2/15 = A182448,

%F f'(1) = f(1) * Sum_{p prime} 2*log(p) / (p^2 + 1) = f(1) * 0.8852429263675811068149340172820329246145172848406469350087715037483367369...

%F and gamma is the Euler-Mascheroni constant A001620. (End)

%t f[p_, e_] := Floor[(e + 3)/4] + Floor[(e + 4)/4]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]

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

%o (PARI) for(n=1, 100, print1(direuler(p=2, n, 1/((1 - X)^2 * (1 + X^2)))[n], ", ")) \\ _Vaclav Kotesovec_, Jan 20 2024

%Y Cf. A000005, A000290, A000583, A004524, A005117, A008833, A034444, A046101, A046951, A182448, A365172, A365173.

%K nonn,easy,mult

%O 1,2

%A _Amiram Eldar_, Aug 25 2023