I am reading this paper, but you don't have to, since I will write down here what is needed for the question. So, there is this test:

Now the paper raises the question whether , for fixed $h$, there is a finite set $\mathfrak{D}_h$ such that $\left(\frac{h\cdot 2^k+1}{p}\right) \neq 1$ for all $p\in\mathfrak{D}$. If $h\equiv 1\pmod 3$ or $h\equiv 2\pmod 3$, then $p=3$ does the trick. So, let $h\equiv 0\pmod 3$ and odd, i.e. $h\equiv 3\pmod 6$. In addition, $h$ must not be of the form $n^2-1$ for an $n$. I showed that a finited set will then not exist (the paper showed it also, but in a different way)
I could show that it's sufficient that $p$ is prime. Also I showed that (by Euler-Fermat) $$ \left(\frac{h\cdot 2^k+1}{p}\right) = \left(\frac{(h \pmod p) \cdot 2^{k\pmod {ord_p(2)}}+1}{p}\right) $$ So there will be a certain cycle, because for fixed $h$ we just have a look at $k\pmod{ord_p(2)}$.
Necessarily, $p$ must not be a divisor of $h$, because else $\left(\frac{h\cdot 2^k+1}{p}\right) = \left(\frac{h\cdot 2^k+1}{p}\right)$
Now, I tried the following with a pythonscript: For fixed $h$ I checked which residuclasses can be managed with a certain $p$. For one certain $h$ (think it was 45), this script came up with $p\in\{5,11,13\}$ and the residueclasses:
- $0\pmod 4$
- $1\pmod 4$
- $2\pmod 4$
- $1\pmod 3$
- $2\pmod 3$
- $1\pmod {10}$
- $3\pmod {12}$
- $7\pmod {12}$
- $11\pmod {12}$
And by calculating the lcm of the moduls and deleting the residueclasses I saw, no numbers are left. So I found a finite set for this $h$.
But as it seems, it's not the case for all $h$. E.g. $h = 9$ seems to let some residueclasses undone, even if I checked the exponents up to 250.000. Maybe because it is a square? I really can't tell.
Can anybody give me some hints?