Infinitely many primes of the form $8n+1$

Solution 1:

This idea seems fine, although notice that $p$ does not have to be your number itself, but can be one of its divisors.

$16p_1^4p_2^4\ldots p_r^4+1$ must have some prime divisor $p$, and it is not one of the existing $p_i$, nor is it 2. Moreover $x=2p_1p_2\ldots p_r$ satisfies the congruence $x^4+1\equiv 0 \pmod p$, and therefore $p\equiv 1\pmod 8$, a contradiction.

Solution 2:

Claim:

The odd prime divisors of $n^4+1$ are of the form $8k+1$

From $n^4\equiv -1\pmod{p}$ we have $n^8\equiv 1\pmod{p}$, therefore the order of $n$ modulo $p$ is $8$, and from the following theorem:

If $a$ is of order $k$ modulo $n$, then $a^h\equiv 1\pmod{n}$ iff $k|h$. Also $k|\phi(n)$.

It follows that $8|\phi(p)$, or in other words: $p=8k+1$.