A373531 a(n) is the maximum number of divisors of n with an equal value of the Euler totient function (A000010).
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1
Offset: 1
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_] := Max[Tally[EulerPhi[Divisors[n]]][[;; , 2]]]; Array[a, 100]
-
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
Comments