The problem statement is: Find all positive integers $n$ such that $\frac{2^{n-1}+1}{n}$ is integer.
Source: LTE Amir Houssein Pavardi P.25
My approach:
It is clear that $n=1$ is a solution, so supose that $n>1$.
$2^{n-1}\equiv -1$ $mod$ $n$;
$2^{2(n-1)}\equiv 1$ $mod$ $n$;
Observe that $n$ is odd hence $n-1$ is even. But if $p=ord_n(2)$ then $p|2(n-1)$ but not $(n-1)$ so $p|2$ how ever it is a contradiction because $n-1$ is even. So the unique solution is $n=1$
Is this proof correct? Because I'm not sure if order properties does apply to composite modulo. And if anyone has a solution involving LTE trick please post a partial proof Thanks in advance!
It is clear that $n$ must be odd, and hence every prime factor of $n$ is odd. Suppose that $n \neq 1$. Then $n$ has some odd prime factor.
Of all of the prime factors of $n$, let $p$ be the one for which the maximum power of $2$ which divides $p - 1$ is smallest.
Then we can write $p = 2^s \cdot t + 1$ for some $s > 0$ and odd natural number $t$. By the way we chose $p$, we have that for any prime factor $q$ of $n$ that $q \equiv 1 \pmod{2^s}$, and hence that $n \equiv 1 \pmod{2^s}$.
Thus we can write $n = 2^s \cdot \alpha + 1$ for some natural number $\alpha$. Let $g$ be a primitive root modulo $p$. Then there is some natural number $\beta$ such that $g^\beta \equiv 2 \pmod p$. Now we know that $$p \,\mid\, n \,\mid\, 2^{n-1} + 1$$ and so $$ g^{\beta(n-1)} \equiv 2^{n-1} \equiv -1 \equiv g^{(p-1)/2} \pmod p. $$
It follows that $$ 2^s \alpha \beta \equiv \beta(n - 1) \equiv \frac{p-1}{2} \equiv 2^{s-1} t \pmod{(p-1)} $$ and so $$ 2^s \alpha \beta \equiv 2^{s - 1} t \pmod{2^s t} $$ which implies that $$ 0 \equiv 2^{s - 1} t \pmod{2^s} $$ which is a contradiction since $t$ is odd.