Hint given is to split $|g|$ in cycles of prime lengths.
Say, $n=1000.$
So, factored $1000$ as $2*2*2*5*5*5$ in order to find minimum value of LCM.
In fact, there is no other prime factorization possible.
Say, a set of disjoint cycles given by $$(1,2)(3,4)(5,6)(7, 8, 9 ,10, 11)(12,13, 14 ,15, 16)(17, 18, 19, 20, 21)$$. But, $21$ is not correct!
Have taken a wrong approach then.
Also, why need prime length cycles in group $S_n$ to generate smallest sum as $=n.$
Not clear if this is some property of prime factorization, i.e. to generate smallest sum.
Say, if had split $1000$ into $2.4.25.5$, then would have got sum of cycle lengths as:$2+4+25+5=36.$
But, then is there a proof of this property.
Best Answer
The hint as written is somewhat misleading: Notice that all of the cycles in your permutation in $S_{21}$ have order $2$ or $5$, so the element has order $\operatorname{lcm}(2, 5) = 10$.
Since $1\,000=2^3 5^3$, we can see that to avoid this problem we'll need to find nonoverlapping cycles of lengths $2^3$ and $5^3$.