Problem

Source: Mathcenter Contest / Oly - Thai Forum 2012 sl-2 https://artofproblemsolving.com/community/c3196914_mathcenter_contest

Tags: number theory, prime



Let $p=2^n+1$ and $3^{(p-1)/2}+1\equiv 0 \pmod p$. Show that $p$ is a prime. (Zhuge Liang)