The following question is from textbook David M Burton ( Elementary number theory) on page 185.

> 
> Given that $p$ and $q=4p+1$ are both primes, then prove any quadratic non-residue of $q$ is either a primitive root of $q$ or has order $4\pmod q$.
> 
> 
> 

As a is quadratic non-residue so $-1 =a/q\equiv a^{2p} \pmod q $ but if I let that a is not a primitive root then how can I prove that a has order 4.

$a^{2p}\equiv -1 $ impllies order is not p, 2 , 2p but $ a^{4p}\equiv 1 \pmod q$ .

How to use both of these to prove that order is 4 mod q?

Can you please help!!