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.
Your $2^{nd}$ hint can be written as below
Proof (sketch): It's an easy observation that $\{k,k+1,\ldots,k+m-1\}$ is a complete residue class modulo $m$. Therefore there is a one-to-one correspondence between the positive integers in $\{0,1,2,\ldots,m-1\}$ which are coprime to $m$ and the positive integers in $\{k,k+1,\ldots,k+m-1\}$ which are coprime to $m$. Therefore the claim follows.
To show that the $n^{th}$ smallest positive integer which is relatively prime to $n$ is at least $\sigma(n)$ it is enough to show that the number of integers in the interval $[1,\sigma(n)]$, which are relatively prime to $n$, is at most $n$. Let $\sigma(n)=k$. Let $$1=d_1<d_2<\cdots<d_k=n$$ be the $k$ divisors. Then $$\sigma(n)=d_1+d_2+\cdots+d_k$$ We partition the interval $[1,\sigma(n)]$ in the following way,
$$[1,\sigma(n)]=I_1\cup I_2\cup\cdots\cup I_k$$
where,
$$I_1=[1,d_1]\\I_2=[d_1+1,d_1+d_2]\\I_3=[d_1+d_2+1,d_1+d_2+d_3]\\\vdots\\I_k=[d_1+d_2+\cdots+d_{k-1}+1,d_1+d_2+\cdots+d_k]=[d_1+d_2+\cdots+d_{k-1}+1,\sigma(n)]$$
Note that $I_j$ has length $d_j$ for $1\leq j\leq k$. Now by the claim above, the number of positive integers in the interval $I_j$ which are coprime to $d_j$ is exactly $\varphi(d_j)$. Since the intervals, $I_j$'s are pairwise disjoint and the positive integers which are relatively prime to $n$ are exactly those which are coprime to all of its divisors, we have the number of positive integers in the interval $[1,\sigma(n)]$ is at most $$\sum_{j=1}^{k}\varphi(d_j)=\sum_{d\mid n}\varphi(d)=n$$ Hence we are done!