A365172 The sum of divisors d of n such that gcd(d, n/d) is a square.
1, 3, 4, 5, 6, 12, 8, 9, 10, 18, 12, 20, 14, 24, 24, 21, 18, 30, 20, 30, 32, 36, 24, 36, 26, 42, 28, 40, 30, 72, 32, 45, 48, 54, 48, 50, 38, 60, 56, 54, 42, 96, 44, 60, 60, 72, 48, 84, 50, 78, 72, 70, 54, 84, 72, 72, 80, 90, 60, 120, 62, 96, 80, 85, 84, 144, 68
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[p_, e_] := If[EvenQ[e], (p^(e + 2) - 1)/(p^2 - 1), (1 + p^(2*Floor[(e + 1)/4] + 1))*(p^(2*Floor[e/4] + 2) - 1)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = {my(f = factor(n), p, e); prod(i = 1, #f~, p = f[i,1]; e = f[i,2]; if(e%2, (1 + p^(2*((e+1)\4)+1))*(p^(2*(e\4)+2) - 1)/(p^2 - 1), (p^(e+2) - 1)/(p^2 - 1)));}
Formula
Multiplicative with a(p^e) = (p^(e+2) - 1)/(p^2 - 1) if e is even, and (1 + p^(2*floor((e+1)/4) + 1))*(p^(2*floor(e/4)+2) - 1)/(p^2 - 1) if e is odd.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1/(2 * Product_{p prime} (1 - 1/p^2 + 1/p^3 - 1/p^5)) = 0.696082796052... .
Comments