Let $n$ be an integer greater than $1$ and $x$ be an integer between $1$ and $10^{12}$. What is the probability that $x^{2n+1}$ ends with $11$? 
Question: Let $x$ be an integer between $1$ and $10^{12}$. What is the probability that $x^3$ ends with $11$?

By expressing $x = a+10b$ where $0\leq a\leq 9$ and using binomial theorem, one can obtain that $a = 1$ and last digit of $b$ must be $7.$
So for $x^3$ to end with $11,$ $x$ must end with $71.$
Since there is only one possibility, so the probability is $\frac{1}{100}.$
However, I would to generalize this problem, that is, 

Question: Let $n$ be an integer greater than $1$ and $x$ be an integer between $1$ and $10^{12}$. What is the probability that $x^{2n+1}$ ends with $11$?

Does the question make sense? I attempt to solve it myself but couldn't come up with a general way to solve it. 
 A: It is possible to think in terms of modular arithmetic. Given $n$, we are interested in solving the congruence $$x^{2n+1}\equiv 11\mod 100.$$ Let $\eta(n)$ be the number of solutions to this congruence. Therefore we can see that the probability that you are looking for is $$\frac{10^{10}\eta(n)}{10^{12}} = \frac{\eta(n)}{100}.$$ Furthermore we have $x^{\varphi(n)}\equiv 1 \mod n$ known as Euler's theorem. Therefore we have $\eta(n)=\eta(n+20)$ (because $\varphi(100)=40$). Now the problem can be completely solved by manually solving the finitely many congruences.
A: I am not exactly sure about how to solve it, but using a simple loop I came up with this interesting observation,
Let's just consider the numbers from 1 to 100,
if $(2n+1)\equiv 1\mod 10$ , the only solution is x = 11
if $(2n+1)\equiv 3\mod 10$ , the only solution is x = 71
if $(2n+1)\equiv 7\mod 10$ , the only solution is x = 31
if $(2n+1)\equiv 9\mod 10$ , the only solution is x = 91
and,
if $(2n+1)\equiv 5\mod 10$, it has no solution
So to answer your question, the probability that $x^{2n+1}$ ends with $11$ is is $\frac{1}{100}$, if $2n+1$ ends with 1/3/7/9, and, the probability is 0 if $2n+1$ ends with 5
