A349131 a(n) = Sum_{d|n} phi(d) * A003958(n/d), where A003958 is fully multiplicative with a(p) = (p-1), and phi is Euler totient function.
1, 2, 4, 4, 8, 8, 12, 8, 14, 16, 20, 16, 24, 24, 32, 16, 32, 28, 36, 32, 48, 40, 44, 32, 52, 48, 46, 48, 56, 64, 60, 32, 80, 64, 96, 56, 72, 72, 96, 64, 80, 96, 84, 80, 112, 88, 92, 64, 114, 104, 128, 96, 104, 92, 160, 96, 144, 112, 116, 128, 120, 120, 168, 64, 192, 160, 132, 128, 176, 192, 140, 112, 144, 144, 208
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Crossrefs
Programs
-
Mathematica
f[p_, e_] := (p - 1)*p^e - (p - 2)*(p - 1)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 09 2021 *)
-
PARI
A003958(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1]--); factorback(f); }; A349131(n) = sumdiv(n,d,eulerphi(d)*A003958(n/d));
Formula
a(n) = Sum_{k=1..n} A003958(gcd(n, k)).
For all n >= 1, a(n) <= A349171(n).
Multiplicative with a(p^e) = (p-1)*p^e - (p-2)*(p-1)^e. - Amiram Eldar, Nov 09 2021
Dirichlet g.f.: (zeta(s-1)/zeta(s)) / Product_{p prime} (1 - 1/p^(s-1) + 1/p^s). - Amiram Eldar, Dec 24 2023
Comments