find all $ a \in \mathbb N $ such that $2^a − 1 \equiv 0 \pmod 3$ and $ 4x^2 + 1 \equiv 0 \pmod {\frac{2^a -1}{3}}$ has a solution I want to find all $ a \in \mathbb N $ such that $2^a − 1 \equiv 0 \pmod 3$  and $ 4x^2 + 1 \equiv 0 \pmod {\frac{2^a -1}{3}}$ has a solution.
I know the approach is to first prove that $a$ should be a power of 2. But I am not able to solve this question.
Partial answer, showing that the two conditions hold true when $a$ is a power of $2$.
The first requirement implies that $a$ is even. To see why, notice that $2^a \equiv (-1)^a \pmod{3}$.
For the second requirement, let $N_a = \frac{2^a-1}{3}$. We can rewrite $4x^2+1\equiv0\pmod{N_a}$ as $(2x)^2\equiv-1\pmod{N_a}$. Since $N_a$ is always odd, this is equivalent to finding values of $N_a$ for which $-1$ is a quadratic residue. We'll show that, if $a = 2^k$ for some positive integer $k$, then $-1$ is a quadratic residue mod $N_a$.
We proceed by induction. Verify that our base case, $k = 1$, is true. Now, let $k &gt; 1$. Then $$ N_{2^k} = \frac{2^{2^k} -1}{3} = \frac{(2^{2^{k - 1}} - 1)(2^{2^{k-1}}+1)}{3} = N_{2^{k-1}}(2^{2^{k-1}} + 1). $$
By our induction hypothesis, $-1$ is a quadratic residue mod $N_{2^{k-1}}$. Furthermore, $-1$ is also a quadratic residue mod $2^{2^{k-1}} + 1$, since $$ (2^{2^{k-2}})^2 \equiv -1 \pmod{2^{2^{k-1}} + 1}. $$
By CRT, $-1$ is a quadratic residue mod $N_{2^k}$, so there is always a solution to the second equation when $a$ is a power of $2$.
COMMENT.- Noting $2^{a'}-1\equiv0\pmod3$ it is clear that $a'=2a$ so we have $\dfrac{4^a-1}{3}=\dfrac{(3+1)^a-1}{3}=3^{a-1}+a\cdot3^{a-2}+\cdots+a$ from which
$$4x^2+1\equiv0\mod{(3^{a-1}+a\cdot3^{a-2}+\cdots+a)}$$ so we have the diophantine equation $$4x^2+1=(3^{a-1}+a\cdot3^{a-2}+\cdots+a)y$$ Helped by Wolfram we have the following results till $a=8=2^3$.
$$a=2\Rightarrow 4x^2+1=5y\Rightarrow \color{red}{(x,y)=(1,1)\text{ is solution}}\\a=3\Rightarrow 4x^2+1=21y\Rightarrow \text{there are not  solution}\\a=4\Rightarrow 4x^2+1=85y\Rightarrow \color{red}{(x,y)=(19,17) \text{ is  solution}}\\a=5\Rightarrow 4x^2+1=341y\Rightarrow \text{there are not  solution}\\a=6\Rightarrow 4x^2+1=1365y\Rightarrow \text{there are not  solution}\\a=7\Rightarrow 4x^2+1=5461y\Rightarrow \text{there are not  solution}\\a=8\Rightarrow 4x^2+1=21845y\Rightarrow\color{red}{ (x,y)=(3606,2381)\text{ is   solution}}$$ The conclusion of this comment is that it is true what OP says: that $a'$ is a power of $2$. I have no disposable time to try to prove this.