I have a couple of issues with this question.
- If n has 1 digit then the difference is always 0, and 0 is not composite.
- If n includes 0, e.g. n=10, a permutation is 01. How do you interpret 01? As 1?
Need advice on proving the question.
I have a couple of issues with this question.
Need advice on proving the question.
It's well-known that $n\equiv S(n)\pmod{9}$ for all positive integers $n$, where $S(n)$ is the sum of the digits of $n$. Let $n'$ be the result when digits of $n$ are swapped. Note that $n-n'\equiv S(n)-S(n')\equiv 0\pmod{9}$ because $S(n)=S(n')$, thus $n-n'$ is composite.