OFFSET
1,2
COMMENTS
The sums of the first 10^k terms, for k = 1, 2, ..., are 15, 161, 1641, 16554, 166029, 1662306, 16630535, 166335597, 1663473941, 16635216306, ... . Apparently, this sequence has an asymptotic mean 1.663... .
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(2) = 2 since 2 has 2 divisors, 1 and 2, and phi(1) = phi(2) = 1.
a(12) = 3 since 3 of the divisors of 12 (3, 4 and 6) have the same value of phi: phi(3) = phi(4) = phi(6) = 2.
MATHEMATICA
a[n_] := Max[Tally[EulerPhi[Divisors[n]]][[;; , 2]]]; Array[a, 100]
PROG
(PARI) a(n) = vecmax(matreduce(apply(x->eulerphi(x), divisors(n)))[ , 2]);
(Python)
from collections import Counter
from sympy import divisors, totient
def a(n):
c = Counter(totient(d) for d in divisors(n, generator=True))
return c.most_common(1)[0][1]
print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Jun 08 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jun 08 2024
STATUS
approved