A367865 a(n) = Sum_{d|n} d * phi(d) * mu(d)^2.
1, 3, 7, 3, 21, 21, 43, 3, 7, 63, 111, 21, 157, 129, 147, 3, 273, 21, 343, 63, 301, 333, 507, 21, 21, 471, 7, 129, 813, 441, 931, 3, 777, 819, 903, 21, 1333, 1029, 1099, 63, 1641, 903, 1807, 333, 147, 1521, 2163, 21, 43, 63, 1911, 471, 2757, 21, 2331, 129, 2401, 2439
Offset: 1
Links
- N. J. A. Sloane, Transforms.
Programs
-
Mathematica
Table[Sum[d*EulerPhi[d]*MoebiusMu[d]^2, {d, Divisors[n]}], {n, 100}]
-
PARI
a(n) = sumdiv(n, d, if (issquarefree(d), d*eulerphi(d))); \\ Michel Marcus, Dec 04 2023
-
Python
from math import prod from sympy import primefactors def A367865(n): return prod(p*(p-1)+1 for p in primefactors(n)) # Chai Wah Wu, Dec 05 2023
Formula
Multiplicative with a(p^e) = p^2 - p + 1. - Amiram Eldar, Dec 04 2023
Sum_{k=1..n} a(k) ~ c * n^3/3, where c = Product_{p prime} (1 - 2/(1+p+p^2)) = 0.51478027457383523467921514707014858470711969900467102074735896602342984... - Vaclav Kotesovec, Dec 05 2023
Comments