For which primes is 6 a quadratic residue?
By the properties of the The Legendre Symbol,  {jatex options:inline}(6/p)=(2/p)(3/p){/jatex}
The The Quadratic Character of 2 is fixed according to
{jatex options:inline}(2/p) = \{ \begin{array}{c} 1 \; if \; p \equiv 1 \; (mod \; 8) \; or \; p \equiv 7 \; (mod \; 8) \\ -1 \; if \; p \equiv 3 \; (mod \; 8) \; or \; p \equiv 5 \; (mod \; 8) \end{array}{/jatex}
The The Quadratic Character of 3 is fixed according to
{jatex options:inline}(3/p) = \{ \begin{array}{c} 1 \; if \; p \equiv 1 \; (mod \; 12) \; or \; p \equiv 11 \; (mod \; 12) \\ -1 \; if \; p \equiv 5 \; (mod \; 12) \; or \; p \equiv 7 \; (mod \; 12) \end{array} {/jatex}
For 6 to be a quadratic residue of 6 we need either  {jatex options:inline}(2/p)=(3/p)=1{/jatex}  or  {jatex options:inline}(2/p)=(3/p)=-1{/jatex}.
Suppose  {jatex options:inline}(2/p)=(3/p)=1{/jatex}. Then  {jatex options:inline}p \equiv 1 \; (mod \; 8) \; or \; p \equiv 7 \; (mod \; 8){/jatex}  and  {jatex options:inline}p \equiv 1 \; (mod \; 12) \; or \; p \equiv 11 \; (mod \; 12){/jatex}.
Hence  {jatex options:inline}p \equiv 1, \; 7, \; 9, \; 15, 17, 23 \; (mod \; 24) {/jatex}  and  {jatex options:inline}p \equiv 1, \; 11, \; 13, \; 23 \; (mod \; 24){/jatex}.
Only  {jatex options:inline}[ \equiv 1, \; 23 \; (mod \; 24){/jatex}  are in both lists.
Suppose  {jatex options:inline}(2/p)=(3/p)=-1{/jatex}. Then  {jatex options:inline}p \equiv 3 \; (mod \; 8) \; or \; p \equiv 5 \; (mod \; 8){/jatex}  and  {jatex options:inline}p \equiv 5 \; (mod \; 12) \; or \; p \equiv 7 \; (mod \; 12){/jatex}.
Hence  {jatex options:inline}p \equiv 3, \; 5, \; 11, \; 13, 19, 21 \; (mod \; 24) {/jatex}  and  {jatex options:inline}p \equiv 5, \; 7, \; 17, \; 19 \; (mod \; 24){/jatex}.
Only  {jatex options:inline}[ \equiv 5, \; 19 \; (mod \; 24){/jatex}  are in both lists.
Then 6 is a quadratic residue of  {jatex options:inline}p \equiv 1, \; 5, \; 19, \; 23 \; (mod \; 24){/jatex}.