How to prove following statement :
Let $~p~$ be Thabit $(321)$ prime of the form : $p=3\cdot 2 ^n-1$
and let $~n~$ be an odd number then :
$~5~$ is a primitive root modulo $~p~$ iff $~n \equiv 3,7 \pmod 8 $
I have checked statement for following consecutive odd exponents :
$n \in \{1,3,7,11,43,55,103,143 \}$
I guess that one should prove that :
$ord_p(5)=2\cdot(3\cdot 2^{n-1}-1)$
Added :
Note that if : $n \equiv 3,7 \pmod 8$ then : $p \equiv 3 \pmod 5$
Le't assume that :
$ord_p(5)=3\cdot 2^{n-1}-1$ , and $~3\cdot 2^{n-1}-1$ is a prime number ,so:
$$5^{3\cdot 2^{n-1}-1} = 5^{\frac{p-1}{2}} \equiv 1 \pmod p ~~\text {and}~~\left(\frac{5}{p}\right) \equiv 5^{\frac{p-1}{2}} \pmod p \Rightarrow$$
$$\Rightarrow \left(\frac{5}{p}\right) = 1 \Rightarrow p \equiv 1,4 \pmod 5$$
which is contradiction since : $p \equiv 3 \pmod 5$ , therefore :
$ord_p(5) = 2 \cdot(3\cdot 2^{n-1}-1)$ , since it cannot be $2$ , so :
$5$ is primitive root modulo $p$ if both $~3\cdot 2^{n}-1 ~~\text{and}~~ 3\cdot 2^{n-1}-1$ are prime numbers .
However , I didn't manage to prove case when $~3\cdot 2^{n-1}-1~$ is a composite number .
In case when $3 \cdot 2^{n-1}-1$ is a composite number one should prove that :
$(5^m)^2 \not \equiv 1 \pmod p$
where $m$ is a proper factor of $3 \cdot 2^{n-1}-1$
Note that if $n \equiv 3,7 \pmod 8$ then $p \equiv 3 \pmod 4$
Added :
$x^2 \equiv a \pmod n$ where $n$ is a prime number has no solution if : $\left(\frac{a}{n}\right)=-1$
So let's assume that $\left(\frac{a}{n}\right) = 1$, if $n \equiv 3 \pmod 4$, Lagrange found that the solutions are given by :
$x \equiv \pm a^{(n+1)/4} \pmod n$
So :
If $~\left(\frac{1}{p}\right) = 1~$ then :
$5^m \equiv 1 \pmod p ~~\text{and}~~ 5^m \equiv -1 \pmod p$
But if $~5^m \equiv 1 \pmod p~$ then $~5^{\frac{p-1}{2}} \equiv 1 \pmod p ~$ since $m$ is a proper factor of $~\frac{p-1}{2}$ .
$$ 5^{\frac{p-1}{2}} \equiv 1 \pmod p ~~\text {and}~~\left(\frac{5}{p}\right) \equiv 5^{\frac{p-1}{2}} \pmod p \Rightarrow$$
$$\Rightarrow \left(\frac{5}{p}\right) = 1 \Rightarrow p \equiv 1,4 \pmod 5$$
which is contradiction since : $p \equiv 3 \pmod 5$ , therefore :
$5^m \not \equiv 1 \pmod p$
Now , I don't know how to prove or disprove that :
$5^m \not \equiv -1 \pmod p$
Since $~p\equiv 3 \pmod 5~$ question whether $~5^m \not \equiv -1 \pmod p$ ?
is equivalent to the question whether $\frac{5^m+1}{p} \not \equiv 2 \pmod {10}$ ?