I am getting into a bit of number theory and came up with the following exercise:
Exercise. Show that each Fermat number is prime iff $F_n | 3^{\frac{F_n-1}{2}}+1$.
My only idea follows (it is not a complete resolution).
Idea. If $F_n | 3^{\frac{F_n-1}{2}}+1$ then $$3^{\frac{F_n-1}{2}}+1 \equiv 0 \hspace{.3cm}(\text{mod} F_n) \Leftrightarrow 3^{\frac{F_n-1}{2}} \equiv -1 \hspace{.3cm}(\text{mod} F_n)$$ My next step was to consider $F_n = 2^{2^n}+1$. This means that $\frac{F_n-1}{2} = 2^{2^n-1}$ and thus the above is equivalent to: $$ 3^{2^{2^n-1}} \equiv -1 \hspace{.3cm} (\text{mod} F_n)$$ But now I don't know how to proceed further on. I have thought about raising the congruence to some exponent (this technique can be seen here: Show that every composite Fermat number is a pseudoprime base 2.) but haven't been able to came up with a solution.
Thanks for any help in advance.