OFFSET
1,3
COMMENTS
The unitary version of A023896.
FORMULA
a(n) = (n/2) * Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(n/d) * (d + 1).
Sum_{k=1..n} a(k) ~ c * n^3, where c = (Pi^2/36) * Product_{p prime} (1 - (2*p-1)/p^3) = A353908 * A065464 = 0.117407... . - Amiram Eldar, Sep 21 2024
MATHEMATICA
uphi[n_] := Times @@ (#[[1]]^#[[2]] - 1 & /@ FactorInteger[n]); a[1] = 1; a[n_] := n uphi[n]/2; Table[a[n], {n, 1, 60}]
a[n_] := (n/2) Sum[If[GCD[d, n/d] == 1, (-1)^PrimeNu[n/d] (d + 1), 0], {d, Divisors[n]}]; Table[a[n], {n, 1, 60}]
PROG
(PARI) a(n) = if(n == 1, 1, my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2] - 1) * n / 2); \\ Amiram Eldar, Sep 21 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Mar 27 2020
STATUS
approved