Let $n \ge 2$ be a positive integer, and let $\sigma(n)$ denote the sum of the positive divisors of $n$. Prove that the $n^{\text{th}}$ smallest positive integer relatively prime to $n$ is at least $\sigma(n)$, and determine for which $n$ equality holds.
My Progress: Really hard problem!!!
Obviously, I looked at examples!
For n=2, $\sigma(2)=3$ and the second positive relatively prime to 2 was 3.
For n=3, $\sigma(3)=4$ and the third positive relatively prime to 3 was 4.
For n=4, $\sigma(4)=1+2+4=7$ and the fourth positive relatively prime to 4 was 7.
For n=5, $\sigma(5)=1+5=6$ and the fifth positive relatively prime to 5 was 6.
For n=6, $\sigma(6)=3\cdot 4=12$ but the sixth positive relatively prime to 6 was 17.
So, from here I conjectured that the equality case is true if and only if $n =$ perfect power of a prime.
Firstly, let $S(n)$ be the $n^{\text{th}}$ smallest positive integer relatively prime to $n$.
Now, for $n=$ prime.It works, since $\sigma(n)=p+1$ and $S(n)=p+1$, since only $p$ is not relatively prime to $p$ and $p+1$ is .
Before proceeding further I would like to state the formula which I got and can be proved by induction or just simple modular arithmetic .
For a given integer $x$ and a perfect power of prime $"l^k"$ . We get that $x$ is the $[x-Q(x,l)]^{\text{th}}$ number which is relatively prime to $l^k$ . where $Q(x,l)$ is the quotient when $x$ is divided by $l$.
Now $n=p^k$ , for some prime $p$ and $k>1$.
So we get that, $\sigma(p^k)= 1+p^2+\dots +p^k$ .
We claim that $S(p^k)=1+p^2+\dots +p^k$ . we can prove this by using the fact that $S(n)$ is unique or in other words , we can show that $1+p^2+\dots +p^k$ is the ${p^k}^{\text{th}}$ relatively prime number rather than finding the ${p^k}^{th}$ relatively prime number .
But by the formula we stated, we get that $1+p^2+\dots +p^k$ is the $[1+p^2+\dots +p^k - Q(1+p^2+\dots +p^k,p)]=[1+p^2+\dots +p^k -(1+p^2+\dots +p^{k-1})]= p^k$
And we are done!
I am stuck in showing that equality case doesn't for multiples prime .
The handout which I am using, gave these hints for the general problem:
$1$. $\sum_{d|n} \phi(d)=n$.
$2$. We basically reverse construct the $\sigma(n$) as the sum of the divisors and construct intervals which each have a different $d_i$ number of relatively prime numbers.
I couldn't even understand the $2^{\text{nd}}$ hint.
Please give a try to this beautiful problem and hope one can give me hints for this problem.
Thanks in advance.