I am trying to find an answer to the following congruence:
$$x^{81} \equiv 95 \pmod{126}$$
And i couldn't find any soltuon but I don't know why.
First I though about the prime factorization for $126 = 2 \times 3^2 \times 7$ then I said well $gcd(x,126) =1$ in order for a solution to exits, because otherwise the $gcd(x,126)$ will not divide $95$
Then I used the euler phi function since I have now that $gcd(x,126) = 1$ and I got that $\phi(126) = \phi(2) \times \phi(9) \times \phi(7) = 1 \times 6 \times 6 = 36$
and so now I have that $$x^{36} \equiv 1 \pmod{126}$$
Now we raise to the power of $2$ so we get $$x^{72} \equiv 1 \pmod{126}$$
Now this implies that $x^{81} \equiv x^9 \pmod {126}$
Now this means that $x^{9} \equiv 95 \pmod {126}$
Now I am going in circles, I want to show that there is no solution that exists but how ?
Hint: Show that any cube is congruent to $0$ or $\pm 1$ modulo $9$.