4. Find all prime numbers for which 3 is a quadratic non-residue and 2 is a quadratic residue (i.e., all prime numbers for which 3 is the smallest positive quadratic non-residue).

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
4. $p \equiv \pm 7(\bmod 24)$.