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”).

Largest m <= n such that phi(m) divides n, where phi is the Euler totient function (A000010).
4

%I #13 Dec 06 2024 11:31:18

%S 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,

%T 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,

%U 2,6,2,64,2,46,2,12,2,22,2,72,2,6,2,12,2,18,2,75

%N Largest m <= n such that phi(m) divides n, where phi is the Euler totient function (A000010).

%H Paolo Xausa, <a href="/A378637/b378637.txt">Table of n, a(n) for n = 1..10000</a>

%F a(2*k+1) = 2, for k >= 1.

%t A378637[n_] := If[OddQ[n] && n > 2, 2, Module[{m = n}, While[!Divisible[n, EulerPhi[m]], m--]; m]];

%t Array[A378637, 100]

%o (PARI) a(n) = my(m=n); while (n % eulerphi(m), m--); m; \\ _Michel Marcus_, Dec 05 2024

%Y Right border of A378636.

%Y Cf. A000010, A319048, A378641.

%K nonn,easy

%O 1,2

%A _Paolo Xausa_, Dec 03 2024