login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A378637
Largest m <= n such that phi(m) divides n, where phi is the Euler totient function (A000010).
4
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,2
FORMULA
a(2*k+1) = 2, for k >= 1.
MATHEMATICA
A378637[n_] := If[OddQ[n] && n > 2, 2, Module[{m = n}, While[!Divisible[n, EulerPhi[m]], m--]; m]];
Array[A378637, 100]
PROG
(PARI) a(n) = my(m=n); while (n % eulerphi(m), m--); m; \\ Michel Marcus, Dec 05 2024
CROSSREFS
Right border of A378636.
Sequence in context: A080221 A137849 A316440 * A118982 A129457 A275365
KEYWORD
nonn,easy,new
AUTHOR
Paolo Xausa, Dec 03 2024
STATUS
approved