In general, do primes of the form $a×2^{n}+1$always have primitive $2^n $th roots of unity (modulo that prime)?

262 Views Asked by At

EDIT: Title had an extra +1 in the 2's exponent

For context, in competitive programming, problems which require a number theoretic transform usually ask for the answer modulo $998244353=7\times17\times2^{23}+1$, since this has a primitive $2^{23}$rd root of unity. I recently saw another problem that asks for the answer modulo $1005060097=3^3\times71\times2^{19}+1$, and it in fact does have a $2^{19}$th primitive root of unity.

I feel like this can't be a coincidence, though I can't quite put my finger on it.