OFFSET
1,2
COMMENTS
a(n) = n iff n is squarefree number (cf. A005117).
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = (p^(e+1)-p^e+p^(e-1)-1)/(p-1).
a(n) = phi(n) * Sum_{k=1..n} 1/phi(n / gcd(n, k))^2. - Daniel Suteu, Nov 04 2018
a(n) = Sum_{k=1..n, gcd(n,k) = 1} tau(gcd(n,k-1)). - Ilya Gutkovskiy, Sep 24 2021
From Werner Schulte, Feb 27 2022: (Start)
Dirichlet g.f.: Sum_{n>0} a(n) / n^s = zeta(s-1) * zeta(2*s) * zeta(3*s) / zeta(6*s). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 15015/(2764*Pi^2) = 0.550411... . - Amiram Eldar, Oct 22 2022
MATHEMATICA
Table[EulerPhi[n]*Total[1/EulerPhi@Divisors@n], {n, 71}] (* Ivan Neretin, Sep 20 2017 *)
f[p_, e_] := (p^(e + 1) - p^e + p^(e - 1) - 1)/(p - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 14 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, eulerphi(n)/eulerphi(d)) \\ Michel Marcus, Jun 17 2013
(PARI) a(n) = my(f=factor(n)); prod(k=1, #f~, (f[k, 1]^(f[k, 2]-1) + (f[k, 1]-1)*f[k, 1]^f[k, 2]-1) / (f[k, 1]-1)); \\ Daniel Suteu, Nov 04 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Vladeta Jovovic, Apr 10 2002
STATUS
approved