4

For the euler's totient function, we have a number $n<10^{18}$

we have to find the value of $i$ between $2$ and $n$ (both inclusive) such that the value of $\phi(i)/i$ is maximum.

I have have observed that this value will be equal to the largest prime number less than or equal to n. Now since $n$ is upto $10^{18}$, what will be the most efficient way to do this?

Salena
  • 638

1 Answers1

1

Hint:

$\phi(p)=p-1$, so now you have to look for largest prime before $10^{18}$

Inceptio
  • 7,881