A378637 Largest m <= n such that phi(m) divides n, where phi is the Euler totient function (A000010).
1, 2, 2, 4, 2, 6, 2, 8, 2, 6, 2, 12, 2, 6, 2, 16, 2, 18, 2, 12, 2, 6, 2, 24, 2, 6, 2, 12, 2, 22, 2, 32, 2, 6, 2, 36, 2, 6, 2, 33, 2, 18, 2, 23, 2, 6, 2, 48, 2, 22, 2, 12, 2, 54, 2, 30, 2, 6, 2, 50, 2, 6, 2, 64, 2, 46, 2, 12, 2, 22, 2, 72, 2, 6, 2, 12, 2, 18, 2, 75
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
A378637[n_] := If[OddQ[n] && n > 2, 2, Module[{m = n}, While[!Divisible[n, EulerPhi[m]], m--]; m]]; Array[A378637, 100]
-
PARI
a(n) = my(m=n); while (n % eulerphi(m), m--); m; \\ Michel Marcus, Dec 05 2024
Formula
a(2*k+1) = 2, for k >= 1.