A348158 a(n) is the sum of the distinct values obtained when the Euler totient function is applied to the divisors of n.
1, 1, 3, 3, 5, 3, 7, 7, 9, 5, 11, 7, 13, 7, 15, 15, 17, 9, 19, 15, 21, 11, 23, 15, 25, 13, 27, 21, 29, 15, 31, 31, 33, 17, 35, 25, 37, 19, 39, 31, 41, 21, 43, 33, 45, 23, 47, 31, 49, 25, 51, 39, 53, 27, 55, 49, 57, 29, 59, 31, 61, 31, 57, 63, 65, 33, 67, 51, 69
Offset: 1
Keywords
Examples
The divisors of 12 are {1, 2, 3, 4, 6, 12} and their phi values are {1, 1, 2, 2, 2, 4}. The set of distinct values is {1, 2, 4} whose sum is 7. Therefore, a(12) = 7.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory): a:= n-> add(i, i=map(phi, divisors(n))): seq(a(n), n=1..69); # Alois P. Heinz, Nov 15 2021
-
Mathematica
a[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; Array[a, 100]
-
PARI
a(n) = vecsum(Set(apply(eulerphi, divisors(n)))); \\ Michel Marcus, Oct 04 2021
-
Python
from sympy import totient, divisors def A348158(n): return sum(set(map(totient,divisors(n,generator=True)))) # Chai Wah Wu, Nov 15 2021
Formula
a(n) <= n, with equality if and only if n is in A326835.
Comments